Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/duplicity/__pycache__/ |
Upload File : |
o �~�_� � @ sJ d dl Z d dlZee dd �Zee dd�Zee dd�ZG dd� de j�ZdS ) � N�SEEK_SET�SEEK_CUR� �SEEK_END� c s\ e Zd ZdZd� fdd� Zef� fdd � Z� fd d�Zd� fd d� Zdd� Z dd� Z � ZS )�FileChunkIOzA A class that allows you reading only a chunk of a file. �rTr Nc sj |� d�s td��|| _|| _|du rt�|�j| j | _tt| �j |||g|�R i |�� | � d� dS )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. r zMode string must begin with 'r'Nr )� startswith� ValueError�offset�bytes�os�stat�st_size�superr �__init__�seek)�self�name�mode�closefdr r �args�kwargs�� __class__� �7/usr/lib/python3/dist-packages/duplicity/filechunkio.pyr s "zFileChunkIO.__init__c s` |t krtt| ��| j| � dS |tkr | �| �� | � dS |tkr.| �| j| � dS dS )z/ Move to a new chunk position. N) r r r r r r �tellr r )r r �whencer r r r &