+
    Bi|                    @   ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHtHtHt ^ RIHt ^ RIHt ^ R	IHt R
 R lt]
R R l4       t]! ^RR7      ! ]P2                  4      tR R ltR R ltR R ltR R ltR R ltR R ltR R lt R# )    )annotationsN)	Generator)contextmanager)NamedTemporaryFile)AnyBinaryIOcast)get_path_uid)format_size)retryc                    V ^8  d   QhRRRR/#    pathstrreturnbool )formats   "C/usr/lib/python3.14/site-packages/pip/_internal/utils/filesystem.py__annotate__r      s      3 4     c                   \         P                  R 8X  g   \        \        R4      '       g   R# \        P                  P                  V 4      '       g   Q hRpW8w  d   \        P                  P                  V 4      '       dQ   \        P                  ! 4       ^ 8X  d    \        V 4      pV^ 8H  # \        P                  ! V \        P                  4      # T \        P                  P                  V 4      rK  R#   \         d     R# i ; i)win32geteuidTNF)sysplatformhasattrosr   isabslexistsr   r
   OSErroraccessW_OKdirname)r   previouspath_uids   &  r   check_path_ownerr(      s     ||wgb)&<&<77==H

77??4  zz|q !+D1H  1}$yyrww//!277??4#8d  ! !s   C6 6DDc               $    V ^8  d   QhRRRRRR/# )r   r   r   kwargsr   r   zGenerator[BinaryIO, None, None]r   )r   s   "r   r   r   .   s"     & &C &3 &3R &r   c              +    "   \        RRRR\        P                  P                  V 4      R\        P                  P	                  V 4      RR/VB ;_uu_ 4       p\        \        V4      p Vx  VP                  4        \        P                  ! VP                  4       4        RRR4       R#   TP                  4        \        P                  ! TP                  4       4       i ; i  + '       g   i     R# ; i5i)	a  Return a file-like object pointing to a tmp file next to path.

The file is created securely and is ensured to be written to disk
after the context reaches its end.

kwargs will be passed to tempfile.NamedTemporaryFile to control
the way the temporary file will be opened.
deleteFdirprefixsuffixz.tmpNr   )
r   r   r   r%   basenamer	   r   flushfsyncfileno)r   r*   fresults   &,  r   adjacent_tmp_filer6   -   s      
 

GGOOD!
 ww%
 	

 
 
 
h"	&LLLNHHV]]_%
 
 LLNHHV]]_%
 
 
s6   AC:C&*B-.4C&#
C:-6C##C&&C7	1	C:g      ?)stop_after_delaywaitc                    V ^8  d   QhRRRR/# r   r   )r   s   "r   r   r   K   s     ( (C (D (r   c                *   \         P                  P                  V 4      '       g+   \         P                  P                  V 4      pW8X  d   MTp KO  \         P                  R8X  d&   \         P
                  ! V \         P                  4      # \        V 4      # )z_Check if a directory is writable.

Uses os.access() on POSIX, tries creating files on Windows.
posix)r   r   isdirr%   namer#   r$   _test_writable_dir_win)r   parents   & r   test_writable_dirr@   K   sb     ggmmD!!&>	ww'yyrww''!$''r   c                    V ^8  d   QhRRRR/# r   r   )r   s   "r   r   r   ]   s     I I I Ir   c                  a R pRo\        ^
4       F  pVRP                  V3R l\        ^4       4       4      ,           p\        P                  P                  W4      p \        P                  ! V\        P
                  \        P                  ,          \        P                  ,          4      p\        P                  ! V4       \        P                  ! V4        R# 	  \        R4      h  \         d     K  \         d      R# i ; i)(accesstest_deleteme_fishfingers_custard_$abcdefghijklmnopqrstuvwxyz0123456789 c              3  P   <"   T F  p\         P                  ! S4      x  K  	  R # 5iN)randomchoice).0_alphabets   & r   	<genexpr>)_test_writable_dir_win.<locals>.<genexpr>c   s     !L8a&--"9"98s   #&TFz3Unexpected condition testing for writable directory)rangejoinr   r   openO_RDWRO_CREATO_EXCLcloseunlinkFileExistsErrorPermissionErrorr"   )r   r0   rK   r=   filefdrL   s   &     @r   r>   r>   ]   s     :H5H2Y"''!L58!LLLww||D'	ryy2::5		ABB HHRLIIdO# ( G
HH  	 	 	s   AC**D8DDDc               $    V ^8  d   QhRRRRRR/# )r   r   r   patternr   z	list[str]r   )r   s   "r   r   r   y   s!      S 3 9 r   c                   a . p\         P                  ! V 4       F7  w  or4\        P                  ! WA4      pVP	                  V3R lV 4       4       K9  	  V# )zReturns a list of absolute paths of files beneath path, recursively,
with filenames which match the UNIX-style shell glob pattern.c              3  d   <"   T F%  p\         P                  P                  SV4      x  K'  	  R # 5irG   )r   r   rP   )rJ   r4   roots   & r   rM   find_files.<locals>.<genexpr>   s#     =Wbggll4++Ws   -0)r   walkfnmatchfilterextend)r   r\   r5   rK   filesmatchesr_   s   &&    @r   
find_filesrg   y   sG     F''$-a..0=W== ( Mr   c                    V ^8  d   QhRRRR/# r   r   r   r   zint | floatr   )r   s   "r   r   r      s     ! !C !K !r   c                    \         P                  P                  V 4      '       d   ^ # \         P                  P                  V 4      # )r   )r   r   islinkgetsizer   s   &r   	file_sizern      s+    	ww~~d77??4  r   c                    V ^8  d   QhRRRR/# r   r   r   r   r   )r   s   "r   r   r      s     ( (3 (3 (r   c                *    \        \        V 4      4      # rG   )r   rn   rm   s   &r   format_file_sizerr      s    y''r   c                    V ^8  d   QhRRRR/# ri   r   )r   s   "r   r   r      s        r   c                    R p\         P                  ! V 4       F@  w  r#pV F4  p\         P                  P                  W%4      pV\	        V4      ,          pK6  	  KB  	  V# )g        )r   ra   r   rP   rn   )r   sizer_   _dirsre   filename	file_paths   &      r   directory_sizery      sP    D ggdmUHT4IIi((D  , Kr   c                    V ^8  d   QhRRRR/# rp   r   )r   s   "r   r   r      s     - - - -r   c                *    \        \        V 4      4      # rG   )r   ry   rm   s   &r   format_directory_sizer|      s    ~d+,,r   )!
__future__r   rb   r   os.pathrH   r   collections.abcr   
contextlibr   tempfiler   typingr   r   r	   pip._internal.utils.compatr
   pip._internal.utils.miscr   pip._internal.utils.retryr   r(   r6   replacer@   r>   rg   rn   rr   ry   r|   r   r   r   <module>r      s    "  	   
 % % ' & & 3 0 +6 & &0 
.rzz
:
($I8!(-r   