Dashboard
PHP:
8.2.30
OS:
Linux
User:
dh_nv8b2m
/
/
usr
/
lib
/
python3
/
dist-packages
/
duplicity
/
__pycache__
📤 Upload
📝 New File
📁 New Folder
Close
Editing: filechunkio.cpython-310.pyc
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 &