HEX
Server: Apache
System: Linux infong-uk86 4.4.400-icpu-106 #2 SMP Mon Sep 15 08:23:40 UTC 2025 x86_64
User: u44115835 (4976590)
PHP: 8.4.17
Disabled: NONE
Upload Files
File: //kunden/lib/python3/dist-packages/breezy/__pycache__/textfile.cpython-39.pyc
a

�*�^��@s\dZddlmZddlmZddlmZddlmZddl	m
Z
dd	�Zd
d�Zdd
�Z
dS)z9Utilities for distinguishing binary files from text files�)�absolute_import)�chain�)�
BinaryFile)�IterableFile)�
file_iteratorcCs,|�d�}d|vrt��tt|ft|���S)z�Produce a file iterator that is guaranteed to be text, without seeking.
    BinaryFile is raised if the file contains a NUL in the first 1024 bytes.
    ��)�readrrrr)�inputZfirst_chunk�r�1/usr/lib/python3/dist-packages/breezy/textfile.py�	text_files
rcCs t|�}d|�d�vrt��dS)ziRaise BinaryFile if the supplied lines contain NULs.
    Only the first 1024 characters are checked.
    r	rN)rr
r)�lines�frrr
�check_text_lines&srcCs6t|d��}t|�Wd�n1s(0YdS)z~Check whether the supplied path is a text, not binary file.
    Raise BinaryFile if a NUL occurs in the first 1024 bytes.
    �rbN)�openr)�pathrrrr
�check_text_path/srN)�__doc__Z
__future__r�	itertoolsr�errorsrZiterablefilerZosutilsrrrrrrrr
�<module>s