+
    Div                        ^ 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# )    )annotationsFileReadStreamFileStreamAttributeFileWriteStream)CallableMapping)SEEK_SETUnsupportedOperation)PathLike)Path)AnyBinaryIOcast)BrokenResourceErrorClosedResourceErrorEndOfStreamTypedAttributeSet	to_threadtyped_attribute)ByteReceiveStreamByteSendStreamc                  `    ] 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   __annotations__r   r   __static_attributes__r       p/Users/tonyclaw/.openclaw/workspace/services/omi-webhook/venv/lib/python3.14/site-packages/anyio/streams/file.pyr   r      s)    $&D(& "D$"!#FC#r$   c                  D    ] 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   )formats   "r%   __annotate___BaseFileStream.__annotate__$   s      X r$   c                	    Wn         R # N_file)selfr   s   &&r%   __init___BaseFileStream.__init__$   s    
r$   c                   V ^8  d   QhRR/# )r)   returnNoner   )r*   s   "r%   r+   r,   '   s     3 3d 3r$   c                	v   "   \         P                  ! V P                  P                  4      G R j  xL
  R #  L5ir.   )r   run_syncr0   closer1   s   &r%   aclose_BaseFileStream.aclose'   s#       !1!1222s   .979c                   V ^8  d   QhRR/# )r)   r5   zMapping[Any, Callable[[], Any]]r   )r*   s   "r%   r+   r,   +   s      "A r$   c                	"  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 P                   # r.   r/   r:   s   r%   <lambda>2_BaseFileStream.extra_attributes.<locals>.<lambda>-   s	    djjr$   namec                 B   < \        S P                  P                  4      # r.   )r   r0   rB   r:   s   r%   r@   rA   1   s    4

;Pr$   c                 8   < S P                   P                  4       # r.   )r0   r   r:   s   r%   r@   rA   8   s    TZZ=N=N=Pr$   )r   r   hasattrr0   r   r   r
   )r1   
attributess   f r%   extra_attributes _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!   r2   r;   propertyrG   r#   r   r$   r%   r'   r'   #   s     3  r$   r'   c                  ^    ] 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]r5   r   r   )r*   s   "r%   r+   FileReadStream.__annotate__G   s     ) )#6 )> )r$   c                   "   \         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

rbNr   r8   r   openr   r   )clsr   r   s   && r%   	from_pathFileReadStream.from_pathF   s;      ''T
>>4$'(( ?s   .AAAc                    V ^8  d   QhRRRR/# )r)   	max_bytesr   r5   bytesr   )r*   s   "r%   r+   rM   Q   s      s u r$   c                	   "    \         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   r8   r0   read
ValueErrorr   OSErrorr   r   )r1   rV   dataexcs   &&  r%   receive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               $    V ^8  d   QhRRRRRR/# )r)   positionr   whencer5   r   )r*   s   "r%   r+   rM   ^   s&     K K3 K K3 Kr$   c                t   "   \         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   r8   r0   seek)r1   ra   rb   s   &&&r%   rd   FileReadStream.seek^   s(      ''

JJJJs   /868c                   V ^8  d   QhRR/# )r)   r5   r   r   )r*   s   "r%   r+   rM   n   s     
9 
9C 
9r$   c                r   "   \         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   r8   r0   tellr:   s   &r%   rh   FileReadStream.telln   s&      ''

8888s   .757r   N)i   )r   r   r    r!   __doc__classmethodrS   r^   r	   rd   rh   r#   r   r$   r%   r   r   =   s5     ) ) 7? K 
9 
9r$   c                  @    ] 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               $    V ^8  d   QhRRRRRR/# )r)   r   rL   appendboolr5   r   r   )r*   s   "r%   r+   FileWriteStream.__annotate__   s$     ) )&)04)	)r$   c                   "   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

abwbNrP   )rR   r   rn   moder   s   &&&  r%   rS   FileWriteStream.from_path   sD      t4''T
>>4$'(( ?s   :AAAc                    V ^8  d   QhRRRR/# )r)   itemrW   r5   r6   r   )r*   s   "r%   r+   rp      s     / /u / /r$   c                	   "    \         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   r8   r0   writerZ   r   r[   r   )r1   rw   r]   s   && r%   send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!   rj   rk   rS   rz   r#   r   r$   r%   r   r   {   s%     ) )/ /r$   N)r   r   r   )
__future__r   __all__collections.abcr   r   ior	   r
   osr   pathlibr   typingr   r   r    r   r   r   r   r   r   abcr   r   r   r'   r   r   r   r$   r%   <module>r      sg    " . -   & &  4$+ $ 4;9_&7 ;9|/o~ /r$   