| Server IP : 178.105.222.151 / Your IP : 216.73.216.38 Web Server : nginx/1.28.3 System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.5.4 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/rich/__pycache__/ |
Upload File : |
+
�ni� � �d � R t R.t^ RIHtHtHtHt R^RR/R R lltR R ltR^RR/R
R llt R# )
a� Functions for reporting filesizes. Borrowed from https://github.com/PyFilesystem/pyfilesystem2
The functions declared in this module should cover the different
use cases needed to generate a string representation of a file size
using several different units. Since there are many standards regarding
file size units, three different functions have been implemented.
See Also:
* `Wikipedia: Binary prefix <https://en.wikipedia.org/wiki/Binary_prefix>`_
�decimal)�Iterable�List�Optional�Tuple� precision� separator� c � � V ^8� d QhR\ R\ \ , R\ R\ \ , R\ \ , R\ /# )� �size�suffixes�baser r �return)�intr �strr )�formats "�//usr/lib/python3/dist-packages/rich/filesize.py�__annotate__r sP � � � �
���s�m�� ��
��}�� ��}�
� �� c � � V ^8X d R# W8 d V R
R2# \ V^4 F w rVW%, pW8 g K M RP W , X, XVVR7 # )� z1 byte�,z bytesz{:,.{precision}f}{separator}{}�r r )� enumerater )r r
r r r �i�suffix�units &&&$$ r �_to_strr sq � � �q�y��
���q��� � ��x��+� ���w���;�� ,� ,�2�2�
��t� ���� 3� � r c
� � V ^8� d QhR\ R\ \ , R\ R\ \ \ 3, /# )r r r
r r )r r r r )r s "r r r + s5 � � � �s� �d�3�i� �s� �u�S�RU�X�� r c �d � \ V4 F w r4W#, pWV, 8 g K WT3# XX3# )z*Pick a suffix and base for the given size.)r )r r
r r r r s &&& r �pick_unit_and_suffixr! + s; � ��x�(� ���w����+����<�� )� ��<�r c �t � V ^8� d QhR\ R\ \ , R\ \ , R\ /# )r r r r r )r r r )r s "r r r 4 s: � � $� $�
�$� ��}�$� ��}� $�
�$r c �"