Ë
    òT•jÄ  ã                   ó¦   — d Z ddlZddlZg d¢Zd„ Zd„ Zd„ Zd„ Zd„ Zd	„ Z	d
„ Z
d„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zej&                   G d„ d«      «       Zy)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ÚisdirÚisfileÚislinkÚsamefileÚsameopenfileÚsamestatÚALLOW_MISSINGc                 óZ   — 	 t        j                  | «       y# t        t        f$ r Y yw xY w)zDTest whether a path exists.  Returns False for broken symbolic linksFT)ÚosÚstatÚOSErrorÚ
ValueError)Úpaths    ú"/usr/lib/python3.12/genericpath.pyr   r      s0   € ðÜ
�‰�Œð øô ”ZÐ ò Ùðús   ‚ ˜*©*c                 ó–   — 	 t        j                  | «      }t        j                  |j
                  «      S # t        t        f$ r Y yw xY w)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Ð ò Ùðúó   ‚6 ¶AÁAc                 ó–   — 	 t        j                  | «      }t        j                  |j
                  «      S # t        t        f$ r Y yw xY w)z<Return true if the pathname refers to an existing directory.F)r   r   r   r   ÚS_ISDIRr   )Úsr   s     r   r	   r	   '   sB   € ðÜ�W‰W�Q‹Zˆô �<‰<˜Ÿ
™
Ó#Ð#øô ”ZÐ ò Ùðúr   c                 ó    — 	 t        j                  | «      }t        j                  |j                  «      S # t        t        t        f$ r Y yw xY w)z&Test whether a path is a symbolic linkF)r   Úlstatr   r   ÚAttributeErrorr   ÚS_ISLNKr   r   s     r   r   r   3   sD   € ðÜ�X‰X�d‹^ˆô �<‰<˜Ÿ
™
Ó#Ð#øô ”Z¤Ð0ò Ùðús   ‚6 ¶AÁAc                 ó@   — t        j                  | «      j                  S )z1Return the size of a file, reported by os.stat().)r   r   Úst_size©Úfilenames    r   r   r   <   s   € ä�7‰7�8Ó×$Ñ$Ð$ó    c                 ó@   — t        j                  | «      j                  S )zCReturn the last modification time of a file, reported by os.stat().)r   r   Úst_mtimer&   s    r   r   r   A   ó   € ä�7‰7�8Ó×%Ñ%Ð%r(   c                 ó@   — t        j                  | «      j                  S )z=Return the last access time of a file, reported by os.stat().)r   r   Úst_atimer&   s    r   r   r   F   r+   r(   c                 ó@   — t        j                  | «      j                  S )zAReturn the metadata change time of a file, reported by os.stat().)r   r   Úst_ctimer&   s    r   r   r   K   r+   r(   c                 óô   — | syt        | d   t        t        f«      s#t        t        t        j
                  | «      «      } t        | «      }t        | «      }t        |«      D ]  \  }}|||   k7  sŒ|d| c S  |S )zGGiven a list of pathnames, returns the longest common leading componentÚ r   N)	Ú
isinstanceÚlistÚtupleÚmapr   ÚfspathÚminÚmaxÚ	enumerate)ÚmÚs1Ús2ÚiÚcs        r   r   r   Q   sv   € á�Rô
 �a˜‘dœT¤5˜MÔ*Ü”#”b—i‘i Ó#Ó$ˆÜ	ˆQ‹€BÜ	ˆQ‹€BÜ˜"“ò ‰ˆˆ1Ø��1‘‹:Ø�b�q�6ŠMðð €Ir(   c                 ój   — | j                   |j                   k(  xr | j                  |j                  k(  S )z5Test whether two stat buffers reference the same file)Úst_inoÚst_dev)r;   r<   s     r   r   r   c   s,   € à�I‰I˜Ÿ™Ñ"ò #Ø�I‰I˜Ÿ™Ñ"ð$r(   c                 ón   — t        j                  | «      }t        j                  |«      }t        ||«      S )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Úf2r;   r<   s       r   r   r   j   s+   € ô 
�‰�‹€BÜ	�‰�‹€BÜ�B˜ÓÐr(   c                 ón   — t        j                  | «      }t        j                  |«      }t        ||«      S )z:Test whether two open file objects reference the same file)r   Úfstatr   )Úfp1Úfp2r;   r<   s       r   r   r   w   s)   € ä	�‰�#‹€BÜ	�‰�#‹€BÜ�B˜ÓÐr(   c                 óð   — | j                  |«      }|r| j                  |«      }t        ||«      }| j                  |«      }||kD  r*|dz   }||k  r | ||dz    |k7  r
| d| | |d fS |dz  }||k  rŒ | | dd fS )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   )Úrfindr8   )ÚpÚsepÚaltsepÚextsepÚsepIndexÚaltsepIndexÚdotIndexÚfilenameIndexs           r   Ú	_splitextrT   …   s¢   € ð �w‰w�s‹|€HÙØ—g‘g˜f“oˆÜ�x Ó-ˆà�w‰w�v‹€HØ�(Òà  1™ˆØ˜hÒ&Ø�˜}¨Q™Ð/°6Ò9Ø˜˜(�| Q x y \Ð1Ð1Ø˜QÑˆMð ˜hÓ&ð
 ˆa��ˆeˆ8€Or(   c                 óÐ   — dx}}|D ]L  }t        |t        «      rd}Œt        |t        «      rd}Œ)t        | › d|j                  j
                  ›�«      d ‚ |r|rt        d«      d ‚y y )NFTz;() argument must be str, bytes, or os.PathLike object, not z.Can't mix strings and bytes in path components)r2   ÚstrÚbytesÚ	TypeErrorÚ	__class__Ú__name__)ÚfuncnameÚargsÚhasstrÚhasbytesr   s        r   Ú_check_arg_typesr_   œ   sˆ   € ØÐ€FˆXØò [ˆÜ�aœÔØ‰FÜ˜œ5Ô!Ø‰Hä˜x˜jð )7Ø78·{±{×7KÑ7KÐ6NðPó QØVZð[ð[ñ ‘(ÜÐHÓIÈtÐSð €vr(   c                   ó   — e Zd ZdZd„ Zd„ Zy)r   z$Special value for use in realpath().c                  ó   — y)Nzos.path.ALLOW_MISSING© ©Úselfs    r   Ú__repr__zALLOW_MISSING.__repr__­   s   € Ø&r(   c                 ó.   — | j                   j                  S )N)rY   rZ   rc   s    r   Ú
__reduce__zALLOW_MISSING.__reduce__¯   s   € Ø�~‰~×&Ñ&Ð&r(   N)rZ   Ú
__module__Ú__qualname__Ú__doc__re   rg   rb   r(   r   r   r   ª   s   „ á.ò'ó'r(   r   )rj   r   r   Ú__all__r   r
   r	   r   r   r   r   r   r   r   r   r   rT   r_   ÚobjectÚ__new__r   rb   r(   r   ú<module>rn      s}   ðñó
 
Û ò(€òò$ò$ò$ò%ò
&ò
&ò
&òò$$òòòò.Tð ‡�÷'ð 'ó ñ'r(   