+
    :1jD                       R t ^ 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 ^RIHt ^RIHtHtHt ]'       d	   ^R	IHtHt ]	! ]4      tR
 tR tR tRR R lltRRR/R R llltRRR/R R lllt R# )zCommon Windows path utilities.)annotationsN)	getLogger)Path)which)TYPE_CHECKING)on_win)nt_to_posixposix_to_ntresolve_paths)	PathsTypePathTypec                B    \         '       d   V P                  R R4      # T # )/\r   replacepaths   &9lib/python3.14/site-packages/conda/common/path/windows.pywin_path_okr      s    &,f4<<T"6$6    c                B    \         '       d   V P                  R R4      # T # )r   z\\r   r   s   &r   win_path_double_escaper      s    )/4<<f%9T9r   c                R    \         P                  ! R RV 4      P                  RR4      # )z	(\\(?! ))r   z:////z://)resubr   r   s   &r   win_path_backoutr   "   s$     66,d+33GUCCr   c          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
   pathsPathType | PathsType | NoneprefixPathType | Nonecygdriveboolto_unixreturnstr | tuple[str, ...] | None )formats   "r   __annotate__r*   )   sA     X2 X2&X2X2 	X2
 X2 "X2r   c          	        V f   R # \        V \        \        P                  34      '       d   T M
\	        V 4      p V '       g+   \        V \        \        P                  34      '       d   R# R# \
        '       d   Vf   ^RIHp VP                  pV'       d:   \        P                  pRp\        p\        P                  p\        P                  p	M8\        P                  pRp\        p\        P                  p\        P                  p	\        R4      p
V
'       d&   \        \!        V
4      P"                  R,          4      MRp\        V \        \        P                  34      '       d   \        V 4      MVP%                  \'        \        V 4      4      pR p \(        P*                  ! WRV.RRRR	7      P,                  P/                  4       p\1        WV	4      pVf
   V! WV4      p\        V \        \        P                  34      '       d   V# V'       g   R# \	        VPE                  V4      4      #   \2         d    \4        P7                  R
4        L{\(        P8                   dh   p\4        P;                  RTP<                  P>                  TTP,                  P/                  4       TP@                  P/                  4       4        R p?LR p?i\B         d7   p\4        P;                  RTP<                  P>                  T4        R p?EL0R p?ii ; i)N.)contextz--unixz	--windowsbashcygpathz--pathT)textcapture_outputcheckz<cygpath is not available, fallback to manual path conversionz_Unexpected cygpath error, fallback to manual path conversion
  %s: %s
  stdout: %s
  stderr: %szEUnexpected cygpath error, fallback to manual path conversion
  %s: %sr(   )#
isinstancestrosPathLiketupler   base.contextr-   target_prefixntpathpathsepr   	posixpathsepr	   r   r   parentjoinmap
subprocessrunstdoutstripr
   FileNotFoundErrorlogwarningCalledProcessErrorerror	__class____name__stderr	Exceptionsplit)r   r!   r#   r%   r-   from_pathsepcygpath_argcygpath_fallback
to_pathsepto_sepr.   r/   joined	convertederrs   &&$$           r   _path_torW   )   sT    }  R[['9::EeE bkk(:;;sCCv&.+&&~~&&&
 ((!&^^
 =D48c$t*##i/0iG ec2;;/00 	E
s3/  !IANN8V4	

 & 	6 ")@	$VX>	%#r{{+,,	Y__Z011?  TRS(( 
		pMM""JJJJ	
 	
  
		TMM""	
 	

s7   5H. . L
L
#L
$AKL
L
+LL
r#   Fc               (    V ^8  d   QhRRRRRRRR/# 	r   r   r    r!   r"   r#   r$   r&   r'   r(   )r)   s   "r   r*   r*      s6     K K&KK 	K
 "Kr   c                   \        WVRR7      # )a]  Convert Windows paths to Unix paths.

.. note::
    Produces unexpected results when run on Unix.

Args:
    paths: The path(s) to convert.
    prefix: The (Windows path-style) prefix directory to use for the conversion.
          If not provided, no checks for prefix paths will be made.
    cygdrive: Whether to use the Cygwin-style drive prefix.
T)r!   r#   r%   rW   r   r!   r#   s   &&$r   win_path_to_unixr]      s    " E8TJJr   c               (    V ^8  d   QhRRRRRRRR/# rY   r(   )r)   s   "r   r*   r*      s6     E E&EE 	E
 "Er   c                   \        WVRR7      # )ay  Convert Unix paths to Windows paths.

.. note::
    Produces unexpected results when run on Unix.

Args:
    paths: The path(s) to convert.
    prefix: The (Windows path-style) prefix directory to use for the conversion.
          If not provided, no checks for prefix paths will be made.
    cygdrive: Unused. Present to keep the signature consistent with `win_path_to_unix`.
F)r#   r%   r[   r\   s   &&$r   unix_path_to_winr`      s    " EHeDDr   )N)!__doc__
__future__r   r:   r5   r<   r   rA   loggingr   pathlibr   shutilr   typingr   compatr   _cygpathr   r	   r
    r   r   rK   rF   r   r   r   rW   r]   r`   r(   r   r   <module>rj      s    % "  	  	        = =%7:DX2vK 	K K(E 	E Er   