+
    :1j                        R t ^ RIHt ^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	H
t
Ht ^ RIHt ^ RIHtHtHtHtHtHt ^ RIHt ^ RIHtHt ^R	IHt ^R
IHt ^RIH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- ]! ].4      t/]P`                  ! R4      t1 ! R R]24      t3R t4RR lt5]RR R ll4       t6RR lt7RR lt8R# )zCDisk utility functions for modifying existing files or directories.)annotationsN)contextmanager)EINVALEPERMEXDEV)	getLogger)basenamedirnameexistsisdirjoinsplit)move)PIPEPopen)DRY_RUN_PREFIX)context)on_win)TRACE)expand)NotWritableError)exp_backoff_fnmkdir_pmkdir_p_sudo_safe)rm_rf)lexistss   ^(#!((?:\\ |[^ \n\r])+)(.*))c                      ] tR t^ tRtR# )CancelOperation N)__name__
__module____qualname____firstlineno____static_attributes__r       :lib/python3.14/site-packages/conda/gateways/disk/update.pyr   r       s    r$   r   c                   R p \        \        V R4      p\        P                  \        RV 4       VP	                  4       pVP                  ^ 4        VP                  V! V4      4       VP                  4         V'       d   VP                  4        R# R#   \         d     Mi ; i T'       d   TP                  4        R#   T'       d   TP                  4        i i ; i)Nzrb+z"in-place update path locked for %sTF)
r   openlogr   readseekwritetruncatecloser   )file_full_pathcallbackfhdatas   &&  r%   update_file_in_place_as_binaryr2   $   s     
BD.%8;^Lwwy

	HHXd^$KKM HHJ   		HHJ HHJ s*   AC 'B B$!C #B$$C Cc           	        \        V4      '       d   V'       d   \        V4       \        V 4      '       d5   \        P                  \        R W4        \        P
                  ! W4       R# \        P                  \        R	V 4       R#   \         EdF   p\        '       d   \        T 4      \        T4      8X  d   \        P                  P                  T 4      '       d   \        \        P                  R4      p\        TR4      p\        T4      '       dK   \        T 4      w  rg\!        T4      p\#        RRYVYx.\$        \$        R7      p	T	P'                  4       w  r Rp?R# \        P)                  RT4        Rp?R# TP*                  \,        \.        \0        39   d9   \        P                  \        RT TTP*                  4       \3        Y4        Rp?R# h Rp?ii ; i)
zrenaming %s => %scondabinzrename_tmp.batzcmd.exez/C)stdoutstderrzx%s is missing.  Conda was not installed correctly or has been corrupted.  Please file an issue on the conda github repo.zHCould not rename %s => %s due to errno [%s]. Falling back to copy/unlinkNz.cannot rename; source path does not exist '%s')r   r   r(   r   osrenameOSErrorr   r	   pathisfiler   r   conda_prefixr
   r   r   r   r   communicatedebugerrnor   r   r   r   )source_pathdestination_pathforceecondabin_dirrename_script_dirname_src_fn_dest_fnpr5   r6   s   &&&         r%   r8   r8   :   sj     U{*KJ(	IIk4R 	GUQ  &	K(G4D,EEGGNN;//#G$8$8*E $\3C D-(((-k(:%H'(89H"D-7U##A
 &']]_NFFIIU% 
 VUE22 &$GG [33M&	s3   B GA	GA;GG:AGGGc               $    V ^8  d   QhRRRRRR/# )   sourcestrdestinationz
str | Nonedry_runboolr   )formats   "r%   __annotate__rR   m   s!      3 Z  r$   c              #     "   Vf   \         P                  ! 4       pV'       d   \        \         RV  RV 24       Rx  R#  \	        WRR7       Rx  R#   \
         d   p\	        YRR7       ThRp?ii ; i5i)z
Used for removing a directory when there are dependent actions (i.e. you need to ensure
other actions succeed before removing it).

Example:
    with rename_context(directory):
        # Do dependent actions here
Nz rename_context z > T)rB   )tempfilemkdtempprintr   r8   	Exception)rL   rN   rO   excs   &&& r%   rename_contextrY   l   so      &&(  0K=IJv$/ {$/	s.   !A7A7A A7A4 A//A44A7c                (    \        \        WV4       R # )N)r   r8   )r@   rA   rB   s   &&&r%   backoff_renamer[      s    6;%@r$   c                2    \        V 4      p \        P                  \        R V 4       \        V 4      '       d   \        P
                  ! V R4       R# \        V 4      p\        V4      '       g)   V'       d!   V'       d   \        V4       M1\        V4       M%\        \        V 4      4      '       g   \        R4      h\        V R4      ;_uu_ 4         RRR4       R#   + '       g   i     R# ; i  \         d   p\        YP                  TR7      hRp?ii ; i)ztouching path %sNTzTarget path is not a directory.aF)	caused_by)r   r(   r   r   r7   utimer	   r   r   r   r9   r'   r   r?   )r:   mkdir	sudo_safedirpathrC   s   &&&  r%   touchrc      s    ;d|)404==HHT4 dmG>>e%g.G$WT]++!"CDDdC !  !  ;tWW::;sI   AC/ #C/ 6C/ >AC/ CC/ C,	&C/ ,C/ /D:DD)F)NF)FF)9__doc__
__future__r   r7   rerT   
contextlibr   r?   r   r   r   loggingr   os.pathr   r	   r
   r   r   r   shutilr   
subprocessr   r   base.constantsr   base.contextr   common.compatr   common.constantsr   common.pathr   
exceptionsr    r   r   r   deleter   linkr   r   r(   compileSHEBANG_REGEXrW   r   r2   r8   rY   r[   rc   r   r$   r%   <module>rw      s    J " 	 	  % & &  A A  " , # # % ! * 8 8  

;<	i 	,/Vd  4A#;r$   