%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/duplicity/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/duplicity/__pycache__/filechunkio.cpython-312.pyc

�

�2eA
��z�ddlZddlZeedd�Zeedd�Zeedd�ZGd�dej�Zy)	�N�SEEK_SET�SEEK_CUR��SEEK_END�c�V��eZdZdZ	d�fd�	Zef�fd�	Z�fd�Zd	�fd�	Zd�Z	d�Z
�xZS)
�FileChunkIOzA
    A class that allows you reading only a chunk of a file.
    c�2��|jd�std��||_||_|�1t	j
|�j|jz
|_t�|� t	j|�||g|��i|��|jd�y)a/
        Open a file chunk. The mode can only be 'r' for reading. Offset
        is the amount of bytes that the chunks starts after the real file's
        first byte. Bytes defines the amount of bytes the chunk has, which you
        can set to None to include the last byte of the real file.
        �rzMode string must begin with 'r'Nr)�
startswith�
ValueError�offset�bytes�os�stat�st_size�super�__init__�fsdecode�seek)	�self�name�mode�closefdrr�args�kwargs�	__class__s	        ��7/usr/lib/python3/dist-packages/duplicity/filechunkio.pyrzFileChunkIO.__init__s}������s�#��>�?�?������
��=������.�.����<�D�J�
������T�*�D�'�K�D�K�F�K��	�	�!��c���|tk(rt�|�	|j|z�y|tk(r#|j|j�|z�y|tk(r|j|j|z�yy)z/
        Move to a new chunk position.
        N)rrrrr�tellrr)rr�whencers   �rrzFileChunkIO.seek'sc����X���G�L����v�-�.�
�x�
��I�I�d�i�i�k�F�*�+�
�x�
��I�I�d�j�j�6�)�*� rc�:��t�|��|jz
S)z(
        Current file position.
        )rr!r)rrs �rr!zFileChunkIO.tell2s����w�|�~����+�+rc���|dk\r9|j|j�z
}t||g�}t�|�|�S|j�S)z2
        Read and return at most n bytes.
        r)rr!�minr�read�readall)r�n�max_nrs   �rr&zFileChunkIO.read8sG���
��6��J�J�����,�E��Q��J��A��7�<��?�"��<�<�>�!rc�Z�|j|j|j�z
�S)z/
        Read all data from the chunk.
        )r&rr!)rs rr'zFileChunkIO.readallCs"���y�y����d�i�i�k�1�2�2rc���|jt|��}t|�}	||d||S#t$r<}ddl}t	||j�s|�|jd|�|d|Yd}~|Sd}~wwxYw)z/
        Same as RawIOBase.readinto().
        Nr�b)r&�len�	TypeError�array�
isinstance)r�b�datar(�errr/s      r�readintozFileChunkIO.readintoIsy���y�y��Q�� ����I��	,��A�b�q�E����
�	,���a����-��	��K�K��d�+�A�b�q�E����
	,�s�.�	A3�1A.�.A3)rTrN)���)�__name__�
__module__�__qualname__�__doc__rrrr!r&r'r4�
__classcell__)rs@rr	r	s1����
=A��$#+�	+�,�	"�3�rr	)�ior�getattrrrr�FileIOr	�rr�<module>r?sI��
�	��2�z�1�%���2�z�1�%���2�z�1�%��G�"�)�)�Gr

Zerion Mini Shell 1.0