ó
    F\hg  ã                   ó¸   • S r SSKrSSKr/ SQrS rS rS rS rS rS	 r	S
 r
S rS rS rS rS rS rS rS rS rS r\R,                   " S S5      5       rg)z˜
Path operations common to more than one OS
Do not use directly.  The OS specific modules import the appropriate
functions from this module themselves.
é    N)ÚcommonprefixÚexistsÚgetatimeÚgetctimeÚgetmtimeÚgetsizeÚ
isdevdriveÚisdirÚisfileÚ
isjunctionÚislinkÚlexistsÚsamefileÚsameopenfileÚsamestatÚALLOW_MISSINGc                 ó^   •  [         R                  " U 5        g! [        [        4 a     gf = f)zDTest whether a path exists.  Returns False for broken symbolic linksFT)ÚosÚstatÚOSErrorÚ
ValueError©Úpaths    Ú"/usr/lib/python3.13/genericpath.pyr   r      s0   € ðÜ
�Š�Œð øô ”ZÐ ó Ùðúó   ‚ ™,«,c                 ó^   •  [         R                  " U 5        g! [        [        4 a     gf = f)zCTest whether a path exists.  Returns True for broken symbolic linksFT)r   Úlstatr   r   r   s    r   r   r      s0   € ðÜ
�Š�Œð øô ”ZÐ ó Ùðúr   c                 óœ   •  [         R                  " U 5      n[        R                  " UR
                  5      $ ! [        [        4 a     gf = f)z%Test whether a path is a regular fileF)r   r   r   r   ÚS_ISREGÚst_mode©r   Ústs     r   r   r   $   sB   € ðÜ�WŠW�T‹]ˆô �<Š<˜Ÿ
™
Ó#Ð#øô ”ZÐ ó Ùðúó   ‚8 ¸AÁ
Ac                 óœ   •  [         R                  " U 5      n[        R                  " UR
                  5      $ ! [        [        4 a     gf = f)z<Return true if the pathname refers to an existing directory.F)r   r   r   r   ÚS_ISDIRr    )Úsr"   s     r   r
   r
   0   sB   € ðÜ�WŠW�Q‹Zˆô �<Š<˜Ÿ
™
Ó#Ð#øô ”ZÐ ó Ùðúr#   c                 ó¦   •  [         R                  " U 5      n[
        R                  " UR                  5      $ ! [        [        [        4 a     gf = f)z&Test whether a path is a symbolic linkF)r   r   r   r   ÚAttributeErrorr   ÚS_ISLNKr    r!   s     r   r   r   <   sD   € ðÜ�XŠX�d‹^ˆô �<Š<˜Ÿ
™
Ó#Ð#øô ”Z¤Ð0ó Ùðús   ‚8 ¸AÁAc                 ó0   • [         R                  " U 5        g)zUTest whether a path is a junction
Junctions are not supported on the current platformF©r   Úfspathr   s    r   r   r   F   ó   € ô ‡I‚Iˆd„OØó    c                 ó0   • [         R                  " U 5        g)zuDetermines whether the specified path is on a Windows Dev Drive.
Dev Drives are not supported on the current platformFr+   r   s    r   r	   r	   M   r-   r.   c                 óB   • [         R                  " U 5      R                  $ )z1Return the size of a file, reported by os.stat().)r   r   Úst_size©Úfilenames    r   r   r   T   s   € ä�7Š7�8Ó×$Ñ$Ð$r.   c                 óB   • [         R                  " U 5      R                  $ )zCReturn the last modification time of a file, reported by os.stat().)r   r   Úst_mtimer2   s    r   r   r   Y   ó   € ä�7Š7�8Ó×%Ñ%Ð%r.   c                 óB   • [         R                  " U 5      R                  $ )z=Return the last access time of a file, reported by os.stat().)r   r   Úst_atimer2   s    r   r   r   ^   r6   r.   c                 óB   • [         R                  " U 5      R                  $ )zAReturn the metadata change time of a file, reported by os.stat().)r   r   Úst_ctimer2   s    r   r   r   c   r6   r.   c                 ó
  • U (       d  g[        U S   [        [        45      (       d#  [        [        [        R
                  U 5      5      n [        U 5      n[        U 5      n[        U5       H  u  p4XBU   :w  d  M  USU s  $    U$ )zGGiven a list of pathnames, returns the longest common leading componentÚ r   N)	Ú
isinstanceÚlistÚtupleÚmapr   r,   ÚminÚmaxÚ	enumerate)ÚmÚs1Ús2ÚiÚcs        r   r   r   i   sp   € æ�Rô
 �a˜‘dœT¤5˜M×*Ñ*Ü”#”b—i‘i Ó#Ó$ˆÜ	ˆQ‹€BÜ	ˆQ‹€BÜ˜"–‰ˆØ�1‘�:Ø�b�q�6ŠMñ ð €Ir.   c                 ót   • U R                   UR                   :H  =(       a    U R                  UR                  :H  $ )z5Test whether two stat buffers reference the same file)Úst_inoÚst_dev)rE   rF   s     r   r   r   {   s,   € à�I‰I˜Ÿ™Ñ"÷ #Ø�I‰I˜Ÿ™Ñ"ð$r.   c                 óp   • [         R                  " U 5      n[         R                  " U5      n[        X#5      $ )zÉTest whether two pathnames reference the same actual file or directory

This is determined by the device number and i-node number and
raises an exception if an os.stat() call on either pathname fails.
)r   r   r   )Úf1Úf2rE   rF   s       r   r   r   ‚   s)   € ô 
�Š�‹€BÜ	�Š�‹€BÜ�BÓÐr.   c                 óp   • [         R                  " U 5      n[         R                  " U5      n[        X#5      $ )z:Test whether two open file objects reference the same file)r   Úfstatr   )Úfp1Úfp2rE   rF   s       r   r   r   �   s'   € ä	�Š�#‹€BÜ	�Š�#‹€BÜ�BÓÐr.   c                 óö   • U R                  U5      nU(       a  U R                  U5      n[        XE5      nU R                  U5      nXd:”  a*  US-   nXv:  a   XUS-    U:w  a	  U SU XS 4$ US-  nXv:  a  M   X SS 4$ )zœSplit the extension from a pathname.

Extension is everything from the last dot to the end, ignoring
leading dots.  Returns "(root, ext)"; ext may be empty.é   Nr   )ÚrfindrB   )ÚpÚsepÚaltsepÚextsepÚsepIndexÚaltsepIndexÚdotIndexÚfilenameIndexs           r   Ú	_splitextr^   �   s”   € ð �w‰w�s‹|€HÞØ—g‘g˜f“oˆÜ�xÓ-ˆà�w‰w�v‹€HØÓà  1™ˆØÓ&Ø˜}¨Q™Ð/°6Ó9Ø˜˜(�| Q y \Ð1Ð1Ø˜QÑˆMð Õ&ð
 ��ˆeˆ8€Or.   c                 óþ   • S=p#U HY  n[        U[        5      (       a  SnM  [        U[        5      (       a  SnM5  [        U  SUR                  R
                  < 35      S e   U(       a  U(       a  [        S5      S eg g )NFTz;() argument must be str, bytes, or os.PathLike object, not z.Can't mix strings and bytes in path components)r=   ÚstrÚbytesÚ	TypeErrorÚ	__class__Ú__name__)ÚfuncnameÚargsÚhasstrÚhasbytesr&   s        r   Ú_check_arg_typesri   ´   s…   € ØÐ€FÛˆÜ�aœ×ÑØŠFÜ˜œ5×!Ñ!ØŠHä˜x˜jð )7Ø78·{±{×7KÑ7KÑ6NðPó QØVZð[ñ ö –(ÜÐHÓIÈtÐSð €vr.   c                   ó$   • \ rS rSrSrS rS rSrg)r   éÂ   z$Special value for use in realpath().c                 ó   • g)Nzos.path.ALLOW_MISSING© ©Úselfs    r   Ú__repr__ÚALLOW_MISSING.__repr__Å   s   € Ø&r.   c                 ó.   • U R                   R                  $ )N)rc   rd   rn   s    r   Ú
__reduce__ÚALLOW_MISSING.__reduce__Ç   s   € Ø�~‰~×&Ñ&Ð&r.   rm   N)rd   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rp   rs   Ú__static_attributes__rm   r.   r   r   r   Â   s   † á.ò'õ'r.   r   )rx   r   r   Ú__all__r   r   r   r
   r   r   r	   r   r   r   r   r   r   r   r   r^   ri   ÚobjectÚ__new__r   rm   r.   r   Ú<module>r}      s�   ðñó
 
Û òO€òòò$ò$ò$òòò%ò
&ò
&ò
&òò$$òòòò.Tð ‡�÷'ð 'ó ñ'r.   