+
    P\iv  c                  s    ^ RI Ht Rt^ RIHtHt ^ RIHtHt ^ RI	H
t
 ^ RIHt ^ R	IHtHtHt ^R
IHtHtHtHtHtHt ^RIHtHt  ! R R]4      t ! R R4      t ! R R]]4      t ! R R]]4      tR# )i    )annotationsFileReadStreamFileStreamAttributeFileWriteStream)CallableMapping)SEEK_SETUnsupportedOperation)PathLike)Path)AnyBinaryIOcast)BrokenResourceErrorClosedResourceErrorEndOfStreamTypedAttributeSet	to_threadtyped_attribute)ByteReceiveStreamByteSendStreamc                  s`    ] tR t^t$ ]! 4       tR]R&   ]! 4       tR]R&   ]! 4       tR]R&   Rt	R# )	r   r   filer	   pathintfileno N)
__name__
__module____qualname____firstlineno__r   r   Z__annotations__r   r   __static_attributes__r       7/usr/lib/python3.14/site-packages/anyio/streams/file.pyr   r      s)    $&D(& "D$"!#FC#r   c                  sD    ] tR t^#tR R ltR R lt]R R l4       tRtR# )	_BaseFileStreamc                   V ^8  d   QhRR/# )   r   r   r   Zformat   "r    __annotate___BaseFileStream.__annotate__$   s      X r   c                	s    Wn         R # N_file)selfr   s   &&r    __init__Z_BaseFileStream.__init__$   s    
r   c               r"   )r#   returnNoner   r$   r%   r    r&   r'   '   s     3 3d 3r   c                	sv   "   \         P                  ! V P                  P                  4      G R j  xL
  R #  L5ir(   )r   run_syncr*   Zcloser+      &r    acloseZ_BaseFileStream.aclose'   s#       !1!1222s   .979c               r"   )r#   r-   zMapping[Any, Callable[[], Any]]r   r$   r%   r    r&   r'   +   s      "A r   c                	s"  a  \         P                  V 3R  l/p\        S P                  R4      '       d   V 3R lV\         P                  &    S P                  P                  4        V 3R lV\         P
                  &   V#   \         d     T# i ; i)c                 s   < S P                   # r(   r)   r0      r    <lambda>2_BaseFileStream.extra_attributes.<locals>.<lambda>-   s	    djjr   namec                 sB   < \        S P                  P                  4      # r(   )r	   r*   r6   r0   r3   r    r4   r5   1   s    4

;Pr   c                 s8   < S P                   P                  4       # r(   )r*   r   r0   r3   r    r4   r5   8   s    TZZ=N=N=Pr   )r   r   Zhasattrr*   r   r   r   )r+   Z
attributess   f r    extra_attributesZ _BaseFileStream.extra_attributes*   s      $$&84

 4::v&&3PJ*//0	QJJ 6QJ*112 $ 	 	s   A? ?BBr)   N)	r   r   r   r   r,   r2   Zpropertyr7   r   r   r   r    r!   r!   #   s     3  r   r!   c                  s^    ] tR t^=tRt]R R l4       tRR R llt]3R R llt	R R	 lt
R
tR# )r   z
A byte stream that reads from a file in the file system.

:param file: a file that has been opened for reading in binary mode

.. versionadded:: 3.0
c                    V ^8  d   QhRRRR/# )r#   r   str | PathLike[str]r-   r   r   r$   r%   r    r&   FileReadStream.__annotate__G   s     ) )#6 )> )r   c                s   "   \         P                  ! \        V4      P                  R4      G Rj  xL
 pV ! \	        \
        V4      4      #  L5i)zc
Create a file read stream by opening the given file.

:param path: path of the file to read from

ZrbNr   r/   r	   Zopenr   r   )clsr   r      && r    	from_pathZFileReadStream.from_pathF   s;      ''T
>>4$'(( ?s   .AAAc               r8   )r#   	max_bytesr   r-   bytesr   r$   r%   r    r&   r:   Q   s      s u r   c                	s   "    \         P                  ! V P                  P                  V4      G R j  xL
 pT'       d   T# \        h L  \         d	    \
        R h\         d   p\        ThR p?ii ; i5ir(   )	r   r/   r*   Zread
ValueErrorr   OSErrorr   r   )r+   r?   Zdataexcs   &&  r    receiveZFileReadStream.receiveQ   sd     	/"++DJJOOYGGD K H 	0%4/ 	/%3.	/sB   A4.A	 AA	 A4A4A	 	A1$A1%A,,A11A4c               s$    V ^8  d   QhRRRRRR/# )r#   positionr   whencer-   r   r$   r%   r    r&   r:   ^   s&     K K3 K K3 Kr   c                st   "   \         P                  ! V P                  P                  W4      G Rj  xL
 #  L5i)a5  
Seek the file to the given position.

.. seealso:: :meth:`io.IOBase.seek`

.. note:: Not all file descriptors are seekable.

:param position: position to seek the file to
:param whence: controls how ``position`` is interpreted
:return: the new absolute position
:raises OSError: if the file is not seekable

N)r   r/   r*   seek)r+   rE   rF   s   &&&r    rG   ZFileReadStream.seek^   s(      ''

JJJJs   /868c               r"   )r#   r-   r   r   r$   r%   r    r&   r:   n   s     
9 
9C 
9r   c                sr   "   \         P                  ! V P                  P                  4      G Rj  xL
 #  L5i)z
Return the current stream position.

.. note:: Not all file descriptors are seekable.

:return: the current absolute position
:raises OSError: if the file is not seekable

N)r   r/   r*   tellr0   r1   r    rH   ZFileReadStream.telln   s&      ''

8888s   .757r   N)i   )r   r   r   r   __doc__classmethodr>   rD   r   rG   rH   r   r   r   r    r   r   =   s5     ) ) 7? K 
9 
9r   c                  s@    ] tR t^{tRt]RR R ll4       tR R ltRtR# )	r   z
A byte stream that writes to a file in the file system.

:param file: a file that has been opened for writing in binary mode

.. versionadded:: 3.0
c               s$    V ^8  d   QhRRRRRR/# )r#   r   r9   appendZboolr-   r   r   r$   r%   r    r&   FileWriteStream.__annotate__   s$     ) )&)04)	)r   c                s   "   V'       d   RMRp\         P                  ! \        V4      P                  V4      G Rj  xL
 pV ! \	        \
        V4      4      #  L5i)z
Create a file write stream by opening the given file for writing.

:param path: path of the file to write to
:param append: if ``True``, open the file for appending; if ``False``, any
    existing file at the given path will be truncated

ZabZwbNr;   )r<   r   rK   Zmoder   s   &&&  r    r>   ZFileWriteStream.from_path   sD      t4''T
>>4$'(( ?s   :AAAc               r8   )r#   itemr@   r-   r.   r   r$   r%   r    r&   rL      s     / /u / /r   c                	s   "    \         P                  ! V P                  P                  V4      G R j  xL
  R #  L  \         d	    \
        R h\         d   p\        ThR p?ii ; i5ir(   )r   r/   r*   ZwriterA   r   rB   r   )r+   rM   rC   r=   r    sendZFileWriteStream.send   sQ     	/$$TZZ%5%5t<<< 	0%4/ 	/%3.	/s7   A&.; 9; A&; A#A#AA##A&r   N)F)	r   r   r   r   rI   rJ   r>   rN   r   r   r   r    r   r   {   s%     ) )/ /r   N)r   r   r   )Z
__future__r    Z__all__Zcollections.abcr   r   Zior   r   Zosr   Zpathlibr	   Ztypingr
   r   r   Z r   r   r   r   r   r   Zabcr   r   r   r!   r   r   r   r   r    <module>rO      sg    " . -   & &  4$+ $ 4;9_&7 ;9|/o~ /r   