%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/duplicity/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/duplicity/__pycache__/filechunkio.cpython-312.pyc |
� �2eA � �z � d dl Z d dlZ ee dd � Z ee dd� Z ee dd� Z G d� de j � Zy) � N�SEEK_SET�SEEK_CUR� �SEEK_END� c �V � � e Zd ZdZ 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 �� |j d� st d� �|| _ || _ |�1t j |� j | j z | _ t �| � t j |� ||g|��i |�� | j d� 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�closefdr r �args�kwargs� __class__s ��7/usr/lib/python3/dist-packages/duplicity/filechunkio.pyr zFileChunkIO.__init__ s} �� � ���s�#��>�?�?������ ��=������.�.����<�D�J� ������T�*�D�'�K�D�K�F�K�� � �!�� c � �� |t k( rt �| � | j |z � y|t k( r#| j | j � |z � y|t k( r| j | j |z � yy)z/ Move to a new chunk position. N)r r r r r �tellr r )r r �whencer s �r r zFileChunkIO.seek'