File: //kunden/lib/python3/dist-packages/breezy/__pycache__/textfile.cpython-39.pyc
a
�*�^� � @ s\ d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m
Z
dd � Zd
d� Zdd
� Z
dS )z9Utilities for distinguishing binary files from text files� )�absolute_import)�chain� )�
BinaryFile)�IterableFile)�
file_iteratorc C s, | � d�}d|v rt� �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.
� � )�readr r r r )�inputZfirst_chunk� r �1/usr/lib/python3/dist-packages/breezy/textfile.py� text_file s
r c C s t | �}d|�d�v rt� �dS )ziRaise BinaryFile if the supplied lines contain NULs.
Only the first 1024 characters are checked.
r r N)r r
r )�lines�fr r r
�check_text_lines&