
    q	h(                     .   S SK r S SKJrJr  S SKJrJrJrJrJ	r	  S SK
Jr  S SK
Jr  S SK
Jr  S SK
Jr  S SK
Jr  S	S
KJr  S	SKJrJrJr  S	SKJr  SSKJrJr  S SK r / SQr!\ RD                  S:  a             S"S jrO          S#S jr         S$S jr          S%S jrS&S jr\ RD                  S:  a               S'S jr#O            S(S jr#          S%S jr$ S&S jr% " S S\5      r&\SSS.S j5       r'\'RQ                  \	5      SSS.S j5       r)\'RQ                  \5      SSS.S j5       r)\'RQ                  \5      \'RQ                  \5      SSS.S  j5       5       r)\'RQ                  \5      SSS.S! j5       r)g))    N)partialsingledispatch)BufferedRandomBufferedReaderBufferedWriterFileIO
TextIOBase)NamedTemporaryFile)SpooledTemporaryFile)TemporaryDirectory)TemporaryFile)_TemporaryFileWrapper   )AiofilesContextManager)AsyncBufferedIOBaseAsyncBufferedReaderAsyncFileIOAsyncTextIOWrapper   )AsyncSpooledTemporaryFileAsyncTemporaryDirectory)r
   r   r   r   )      c                 <    [        [        SU UUUUUUUUU	U
S95      $ )!Async open a named temporary fileT)namedmode	bufferingencodingnewlinesuffixprefixdirdeletedelete_on_closeloopexecutorr   _temporary_file)r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   s              L/var/www/html/env/lib/python3.13/site-packages/aiofiles/tempfile/__init__.pyr
   r
      s=     &#! /!
 	
    c
                 :    [        [        SU UUUUUUUUU	S95      $ )r   T)r   r   r   r    r!   r"   r#   r$   r%   r'   r(   r)   )
r   r   r    r!   r"   r#   r$   r%   r'   r(   s
             r+   r
   r
   ?   s:     &#!!
 	
r,   c	                 8    [        [        SU UUUUUUUUS9
5      $ )z$Async open an unnamed temporary fileF)
r   r   r   r    r!   r"   r#   r$   r'   r(   r)   )	r   r   r    r!   r"   r#   r$   r'   r(   s	            r+   r   r   ]   s7     "	
 r,   c
                 8    [        [        U UUUUUUUUU	S9
5      $ )z#Async open a spooled temporary file
max_sizer   r   r    r!   r"   r#   r$   r'   r(   )r   _spooled_temporary_filer0   s
             r+   r   r   y   s7     "	
 r,   c           
      *    [        [        XX#US95      $ )z Async open a temporary directoryr"   r#   r$   r'   r(   )AiofilesContextManagerTempDir_temporary_directoryr4   s        r+   r   r      s    (cx	
 r,   c                 \  #    U
c  [         R                  " 5       n
U (       a  [        [        UUUUUUUUU	S9
nO[        [        UUUUUUUS9nU
R                  X5      I Sh  vN n[        U5      [        L a(  [        UR                  XUS9nUR                  Ul
        U$ [        XXS9$  NH7f):Async method to open a temporary file with async interfaceN)	r   r   r    r!   r"   r#   r$   r%   r&   r   r   r    r!   r"   r#   r$   r'   r(   )asyncioget_running_loopr   syncNamedTemporaryFilesyncTemporaryFilerun_in_executortypesyncTemporaryFileWrapperwrapfile_closer)r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r1   cbfresults                   r+   r*   r*      s       <++-D&#! /B !#!	B &&x44 7..!&&!BFYYFNM 4;; 5s   AB,!B*"A	B,c                 Z  #    U	c  [         R                  " 5       n	U (       a  [        [        UUUUUUUUS9	nO[        [        UUUUUUUS9nU	R                  X5      I Sh  vN n[        U5      [        L a(  [        UR                  XU
S9nUR                  Ul
        U$ [        XXS9$  NH7f)r8   N)r   r   r    r!   r"   r#   r$   r%   r9   r:   )r;   r<   r   r=   r>   r?   r@   rA   rB   rC   r%   )r   r   r   r    r!   r"   r#   r$   r%   r'   r(   r1   rE   rF   rG   s                  r+   r*   r*      s      <++-D&#!
B !#!	B &&x44 7..!&&!BFHHFMM 4;; 5s   AB+ B)!A	B+c
                    #    Uc  [         R                  " 5       n[        [        U UUUUUUUS9	n
UR	                  X5      I Sh  vN n[        XU	S9$  N7f)z2Open a spooled temporary file with async interfaceN)r1   r   r   r    r!   r"   r#   r$   r:   )r;   r<   r   syncSpooledTemporaryFiler?   r   )r1   r   r   r    r!   r"   r#   r$   r'   r(   rE   rF   s               r+   r2   r2     sh      |'')	 

B ""800A %QHEE 	1s   AAAAc                    #    Uc  [         R                  " 5       n[        [        XU5      nUR	                  XE5      I Sh  vN n[        XcUS9$  N7f)z?Async method to open a temporary directory with async interfaceNr:   )r;   r<   r   syncTemporaryDirectoryr?   r   )r"   r#   r$   r'   r(   rE   rF   s          r+   r6   r6   8  sN      |'')	'	=B""800A"1(CC 	1s   >A AAc                       \ rS rSrSrS rSrg)r5   iE  zGWith returns the directory location, not the object (matching sync lib)c                 l   #    U R                   I S h  vN U l        U R                  R                  $  N7f)N)_coro_objname)selfs    r+   
__aenter__(AiofilesContextManagerTempDir.__aenter__H  s&     **$	yy~~ %s   42 4)rP   N)__name__
__module____qualname____firstlineno____doc__rS   __static_attributes__ r,   r+   r5   r5   E  s
    Qr,   r5   r:   c                6    [        SR                  U 5      5      e)z=Wrap the object with interface based on type of underlying IOzUnsupported IO type: {})	TypeErrorformatbase_io_objrC   r'   r(   s       r+   rB   rB   M  s     -44[A
BBr,   c                    [        XUS9$ Nr:   r   r_   s       r+   _rc   S  s    dAAr,   c                    [        XUS9$ rb   )r   r_   s       r+   rc   rc   X  s    tBBr,   c                    [        XUS9$ rb   )r   r_   s       r+   rc   rc   ]  s     tBBr,   c                    [        XUS9$ rb   )r   r_   s       r+   rc   rc   c  s    t::r,   )w+bNNNNNTTNN)
rg   rh   NNNNNTNN)	rg   rh   NNNNNNN)
r   rg   rh   NNNNNNN)NNNNN)Trg   rh   NNNNNTTNNr   )Trg   rh   NNNNNTNNr   )*r;   	functoolsr   r   ior   r   r   r   r	   tempfiler
   r=   r   rJ   r   rL   r   r>   r   rA   baser   threadpool.binaryr   r   r   threadpool.textr   	temptypesr   r   sys__all__version_infor*   r2   r6   r5   rB   registerrc   r[   r,   r+   <module>rt      sH    - Q Q A E A 7 F ) U U 0 I 
 w 
D 
> 
	: 		: w 6<v 5<r 		FF =A
D$:  $(4 C C
 z!% B B ~!% C C ~~!% C  C v!% ; ;r,   