HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/env/lib/python3.10/site-packages/pathlib_mate/helper.pyc
�
�´ac	@sOddlZd�Zd�Zdddddd	d
ddg	Zd
d�ZdS(i����NcCs't|tj�r|Stj|�SdS(s!
    Ensure value is string.
    N(t
isinstancetsixtstring_typest	text_type(tvalue((spathlib_mate/helper.pyt
ensure_strscCsFt|tttf�r5g|D]}t|�^qSt|�gSdS(s#
    Pre-process input argument, whether if it is:

    1. abspath
    2. Path instance
    3. string
    4. list or set of any of them

    It returns list of path.

    :return path_or_path_list: always return list of path in string

    **中文文档**

    预处理输入参数。
    N(RttupletlisttsetR(tpath_or_path_listtpath((spathlib_mate/helper.pytensure_liststBtKBtMBtGBtTBtPBtEBtZBtYBicCs||dkrd|Sd}x3|d7}t|d�\}}|dkrPqqWd|}|j||dt|�}|S(s�
    Return human readable string represent of a file size. Doesn't support
    size greater than 1EB.

    For example:

    - 100 bytes => 100 B
    - 100,000 bytes => 97.66 KB
    - 100,000,000 bytes => 95.37 MB
    - 100,000,000,000 bytes => 93.13 GB
    - 100,000,000,000,000 bytes => 90.95 TB
    - 100,000,000,000,000,000 bytes => 88.82 PB
    ...

    Magnitude of data::

        1000         kB    kilobyte
        1000 ** 2    MB    megabyte
        1000 ** 3    GB    gigabyte
        1000 ** 4    TB    terabyte
        1000 ** 5    PB    petabyte
        1000 ** 6    EB    exabyte
        1000 ** 7    ZB    zettabyte
        1000 ** 8    YB    yottabyte
    is%s Biis{0:.%sf} {1}g�@(tdivmodtformattMAGNITUDE_OF_DATA(t
size_in_bytest	precisiontindextmodttemplatets((spathlib_mate/helper.pytrepr_data_size*s

(RRRRR(((spathlib_mate/helper.pyt<module>s	
	!