Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
file.cpython-313.pyc79 linesDownload Raw Back to __pycache__
1�

2�jL����SSKJr SrSSKJrJr SSKJrJr SSK	J3r4 SSKJr SSK
JrJr SS	KJrJrJrJrJrJr SS5KJrJr "SS\5r"S
S5r"SS\\5r"SS\\5rg)�)�annotations)�FileReadStream�FileStreamAttribute�FileWriteStream)�Callable�Mapping)�SEEK_SET�UnsupportedOperation)�PathLike)�Path)�IO�Any�)�BrokenResourceError�ClosedResourceError�EndOfStream�TypedAttributeSet�	to_thread�typed_attribute)�ByteReceiveStream�ByteSendStreamc�^�\rSrSr%\"5rS\S'\"5rS\S'\"5rS\S'Sr	g	)6r��	IO[bytes]�filer�path�int�fileno�N)7�__name__�8__module__�__qualname__�__firstlineno__rr�__annotations__rr�__static_attributes__r��XD:\code\apps\devtools\python\user_packages\Python313\site-packages\anyio/streams/file.pyrrs)��%�'�D�)�'� �"�D�$�"�!�#�F�C�#r&rc�<�\rSrSrSSjrSSjr\S	Sj5rSrg)9�_BaseFileStream�#c��Xlg�N��_file)�selfrs  r'�__init__�_BaseFileStream.__init__$s���10r&c��t# �[R"URR5IShv�N gN7fr,)r�run_syncr.�close�r/s r'�aclose�_BaseFileStream.aclose's#���� � ����!1�!1�2�2�2�s�.8�6�8c�^�[RU4Sj0n[TRS5(aU4SjU[R'TRR5 U4SjU[R11'U$![a U$f=f)Nc�>�TR$r,r-r5s�r'�<lambda>�2_BaseFileStream.extra_attributes.<locals>.<lambda>-s	���d�j�jr&�namec�B>�[TRR5$r,)rr.r<r5s�r'r:r;1s���4��12�13���;Pr&c�8>�TRR5$r,)r.rr5s�r'r:r;8s���T�Z�Z�=N�=N�=Pr&)rr�hasattrr.rrr14)r/�15attributess` r'�extra_attributes� _BaseFileStream.extra_attributes*s����
 �$�$�&8�416�17��4�:�:�v�&�&�3P�J�*�/�/�0�	Q��J�J����6Q�J�*�1�1�2����$�	����	�s�A>�>18B�Br-N)rr)�return�None)rCzMapping[Any, Callable[[], Any]])	r r!r"r#r0r6�propertyrAr%rr&r'r)r)#s ���3����r&r)c�T�\rSrSrSr\S	Sj5rS19SSjjr\4SSjjr	S
Sjr20Srg)r�=z�21A byte stream that reads from a file in the file system.22 23:param file: a file that has been opened for reading in binary mode24 25.. versionadded:: 3.026c��# �[R"[U5RS5IShv�NnU"U5$N7f)zc27Create a file read stream by opening the given file.28 29:param path: path of the file to read from30 31�rbN�rr3r�open)�clsrrs   r'�	from_path�FileReadStream.from_pathFs3����'�'��T�32����>�>���4�y��?�s�.?�=�
?c���# �[R"URRU5IShv�NnU(aU$[eN![a [33Se[an[UeSnAff=f7fr,)	rr3r.�read�34ValueErrorr�OSErrorrr)r/�	max_bytes�data�excs    r'�receive�FileReadStream.receiveQsd���	/�"�+�+�D�J�J�O�O�Y�G�G�D���K���H���	0�%�4�/��	/�%�3�.��	/�s7�A1�.A�A�A�A1�A�A.�"A)�)A.�.A1c��t# �[R"URRX5IShv�N$N7f)a535Seek the file to the given position.36 37.. seealso:: :meth:`io.IOBase.seek`38 39.. note:: Not all file descriptors are seekable.40 41:param position: position to seek the file to42:param whence: controls how ``position`` is interpreted43:return: the new absolute position44:raises OSError: if the file is not seekable45 46N)rr3r.�seek)r/�position�whences   r'rY�FileReadStream.seek^s(����'�'��47�48����J�J�J�J�s�/8�6�8c��r# �[R"URR5IShv�N$N7f)z�49Return the current stream position.50 51.. note:: Not all file descriptors are seekable.52 53:return: the current absolute position54:raises OSError: if the file is not seekable55 56N)rr3r.�tellr5s r'r^�FileReadStream.tellns&����'�'��57�58���8�8�8�8�s�.7�5�7rN)r�str | PathLike[str]rCr)i)rSrrC�bytes)rZrr[rrCr)rCr)r r!r"r#�__doc__�classmethodrMrVr	rYr^r%rr&r'rr=s0��������7?�K� 599r&rc�F�\rSrSrSr\SSSjj5rS	SjrSrg)60r�{z�61A byte stream that writes to a file in the file system.62 63:param file: a file that has been opened for writing in binary mode64 65.. versionadded:: 3.066c��# �U(aSOSn[R"[U5RU5IShv�NnU"U5$N7f)z�67Create a file write stream by opening the given file for writing.68 69:param path: path of the file to write to70:param append: if ``True``, open the file for appending; if ``False``, any71    existing file at the given path will be truncated72 73�ab�wbNrJ)rLr�append�moders     r'rM�FileWriteStream.from_path�s<����t�4���'�'��T�74����>�>���4�y��?�s�9A75�A�
A76c���# �[R"URRU5IShv�N gN![a [77Se[an[UeSnAff=f7fr,)rr3r.�writerQrrRr)r/�itemrUs   r'�send�FileWriteStream.send�sQ���	/��$�$�T�Z�Z�%5�%5�t�<�<�<���	0�%�4�/��	/�%�3�.��	/�s1�A#�.:�8�:�A#�:�A �A�A � A#rN)F)rr`ri�boolrCr)rnrarCrD)	r r!r"r#rbrcrMror%rr&r'rr{s;����7<�
�&�
�04�
�	�
��
�/r&rN)�78__future__r�__all__�collections.abcrr�ior	r79�osr�pathlibr�typingr
r�rrrrrr�abcrrrr)rrrr&r'�<module>r{sd��"���.�-������4�$�+�$���4;9�_�&7�;9�|/�o�~�/r&
codekingpro/portable-devtools · Team Ai