+
     Bij                        R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI5 ^ RI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t ^ RIt^ RIHtHtHtHtHtHtH t H!t! . ROt" ! R R]#4      t$ ! R R]4      t% ! R R	4      t&]PN                  PQ                  ]&4        ! R R
]&4      t) ! R R]&4      t* ! R R]&4      t+ ! R R]+])4      t, ! R R]+]*4      t-R#   ] d    Rt Li ; i  ] d    Rt Li ; i)zObject-oriented filesystem paths.

This module provides classes to represent abstract paths and concrete
paths with operations that have semantics appropriate for different
operating systems.
N)*)_StringGlobber_no_recurse_symlinks)chain)S_ISDIRS_ISREGS_ISSOCKS_ISBLKS_ISCHRS_ISFIFO)Sequence)PathInfoDirEntryInfoensure_different_filesensure_distinct_paths	copyfile2copyfileobj
magic_open	copy_infoUnsupportedOperationPurePathPurePosixPathPureWindowsPathPath	PosixPathWindowsPathc                       ] tR t^+tRtRtR# )r   zLAn exception that is raised when an unsupported operation is attempted.
     N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       '/usr/lib/python3.14/pathlib/__init__.pyr   r   +   s
    r$   c                   @   a  ] tR t^1t o RtRtR tR tR tR t	Rt
V tR# )	_PathParentszrThis object provides sequence-like access to the logical ancestors
of a path.  Don't try to construct it yourself.c                x    Wn         VP                  V n        VP                  V n        VP
                  V n        R # N)_pathdrive_drvroot_root_tailselfpaths   &&r%   __init___PathParents.__init__6   s(    
JJ	YY
ZZ
r$   c                ,    \        V P                  4      # r)   )lenr/   r1   s   &r%   __len___PathParents.__len__<   s    4::r$   c           
     &  a  \        V\        4      '       dq   \        ;QJ d6    . V 3R  l\        VP	                  \        S 4      4      !   4       F  NK  	  5# ! V 3R  l\        VP	                  \        S 4      4      !   4       4      # V\        S 4      8  g   V\        S 4      ) 8  d   \        V4      hV^ 8  d   V\        S 4      ,          pS P                  P                  S P                  S P                  S P                  RV) ^,
           4      # )c              3   6   <"   T F  pSV,          x  K  	  R # 5ir)   r   ).0ir1   s   & r%   	<genexpr>+_PathParents.__getitem__.<locals>.<genexpr>A   s     I*HQa*Hs   N)
isinstanceslicetuplerangeindicesr6   
IndexErrorr*   _from_parsed_partsr,   r.   r/   )r1   idxs   f&r%   __getitem___PathParents.__getitem__?   s    c5!!5I%SY1G*HI5I5I%SY1G*HIII#d)sc$iZ/S/!73t9Czz,,TYY

-1ZZ	#-BD 	Dr$   c                ^    R P                  \        V P                  4      P                  4      # )z<{}.parents>)formattyper*   r   r7   s   &r%   __repr___PathParents.__repr__J   s"    $$T$**%5%>%>??r$   )r,   r*   r.   r/   N)r*   r,   r.   r/   )r   r   r    r!   r"   	__slots__r3   r8   rH   rM   r#   __classdictcell____classdict__s   @r%   r'   r'   1   s+     73I 	D@ @r$   r'   c                     a  ] tR t^Nt o RtR6t]P                  tR t	R t
R tR tR tR tR tR	 tR
 tR t]R 4       tR tR t]R 4       tR tR tR tR tR t]R 4       tR tR t ]R 4       t!]R 4       t"R t#]R 4       t$]R 4       t%]R 4       t&]R 4       t']R 4       t(]R  4       t)]R! 4       t*]R" 4       t+]R# 4       t,R$ t-R% t.R& t/]R' 4       t0]R( 4       t1]R) 4       t2R*R+/R, lt3R- t4R. t5R/ t6R0 t7R1R2/R3 lt8R1R2/R4 lt9R5t:V t;R2# )7r   ad  Base class for manipulating paths without I/O.

PurePath represents a filesystem path and offers operations which
don't imply any actual filesystem I/O.  Depending on your system,
instantiating a PurePath will return either a PurePosixPath or a
PureWindowsPath object.  You can also instantiate either of these classes
directly, regardless of your system.
c                    V \         J d"   \        P                  R8X  d   \        M\        p \
        P                  V 4      # )zConstruct a PurePath from one or several strings and or existing
PurePath objects.  The strings and path objects are combined so as
to yield a canonicalized path, which is incorporated into the
new PurePath object.
nt)r   osnamer   r   object__new__clsargskwargss   &*,r%   rY   PurePath.__new__}   s+     (?%'WW_/-C~~c""r$   c                   . pV F  p\        V\        4      '       dY   VP                  V P                  Jd"   VP                  VP	                  4       4       KT  VP                  VP                  4       Kq   \        P                  ! V4      p\        V\        4      '       g#   \        R \        V4      P                  : 24      hVP                  V4       K  	  W n        R#   \         d    Tp Ldi ; i)zVargument should be a str or an os.PathLike object where __fspath__ returns a str, not N)r@   r   parserappendas_posixextend
_raw_pathsrV   fspath	TypeErrorstrrL   r   )r1   r\   pathsargr2   s   &*   r%   r3   PurePath.__init__   s    C#x((::T[[0LL0LL099S>D "$,,##Dz22578 8 T"# $   ! Ds   7C""C21C2c                     \        V 4      ! V!  # )zConstruct a new path object from any number of path-like objects.
Subclasses may override this method to customize how new path objects
are created from methods like `iterdir()`.
)rL   r1   pathsegmentss   &*r%   with_segmentsPurePath.with_segments   s    
 Dz<((r$   c                *    V P                   ! V .VO5!  # )zCombine this path with one or several arguments, and return a
new path representing either a subpath (if all arguments are relative
paths) or a totally different path (if one of the arguments is
anchored).
)rn   rl   s   &*r%   joinpathPurePath.joinpath   s     !!$666r$   c                T     V P                  W4      #   \         d
    \        u # i ; ir)   rn   rf   NotImplementedr1   keys   &&r%   __truediv__PurePath.__truediv__   s-    	"%%d00 	"!!	"    ''c                T     V P                  W4      #   \         d
    \        u # i ; ir)   rt   rv   s   &&r%   __rtruediv__PurePath.__rtruediv__   s-    	"%%c00 	"!!	"rz   c                D    V P                   \        V P                  4      3# r)   )	__class__rB   rd   r7   s   &r%   
__reduce__PurePath.__reduce__   s    ~~uT__555r$   c                j    R P                  V P                  P                  V P                  4       4      # )z{}({!r}))rK   r   r   rb   r7   s   &r%   rM   PurePath.__repr__   s%      !8!8$--/JJr$   c                    \        V 4      # r)   )rg   r7   s   &r%   
__fspath__PurePath.__fspath__   s    4yr$   c                .    \         P                  ! V 4      # )zYReturn the bytes representation of the path.  This is only
recommended to use under Unix.)rV   fsencoder7   s   &r%   	__bytes__PurePath.__bytes__   s     {{4  r$   c                     V P                   #   \         dS    T P                  \        J d   \	        T 4      T n         M\	        T 4      P                  4       T n         T P                   u # i ; ir)   )_str_normcase_cachedAttributeErrorr`   	posixpathrg   lowerr7   s   &r%   _str_normcasePurePath._str_normcase   sY    	-,,, 	-{{i',/I),/IOO,=),,,	-s    AA+*A+c                     V P                   #   \         d*    \        T P                  4      T n         T P                   u # i ; ir)   )_hashr   hashr   r7   s   &r%   __hash__PurePath.__hash__   s<    	:: 	d001DJ::	s    1AAc                    \        V\        4      '       g   \        # V P                  VP                  8H  ;'       d    V P                  VP                  J # r)   )r@   r   ru   r   r`   r1   others   &&r%   __eq__PurePath.__eq__   sA    %**!!!!U%8%88XXT[[ELL=XXr$   c                     V P                   #   \         dD    T P                  P                  T P                  P
                  4      T n         T P                   u # i ; ir)   )_parts_normcase_cachedr   r   splitr`   sepr7   s   &r%   _parts_normcasePurePath._parts_normcase   sO    	/... 	/*.*<*<*B*B4;;??*SD'...	/s    AAAc                    \        V\        4      '       d   V P                  VP                  Jd   \        # V P                  VP                  8  # r)   r@   r   r`   ru   r   r   s   &&r%   __lt__PurePath.__lt__   ;    %**dkk.M!!##e&;&;;;r$   c                    \        V\        4      '       d   V P                  VP                  Jd   \        # V P                  VP                  8*  # r)   r   r   s   &&r%   __le__PurePath.__le__   ;    %**dkk.M!!##u'<'<<<r$   c                    \        V\        4      '       d   V P                  VP                  Jd   \        # V P                  VP                  8  # r)   r   r   s   &&r%   __gt__PurePath.__gt__   r   r$   c                    \        V\        4      '       d   V P                  VP                  Jd   \        # V P                  VP                  8  # r)   r   r   s   &&r%   __ge__PurePath.__ge__   r   r$   c                     V P                   #   \         dP    T P                  T P                  T P                  T P
                  4      ;'       g    RT n         T P                   u # i ; i)zSReturn the string representation of the path, suitable for
passing to system calls..)_strr   _format_parsed_partsr+   r-   r/   r7   s   &r%   __str__PurePath.__str__   sa    	99 	11$**dii26**> E EAD I99	s    AA(A('A(c                R   V'       g	   V'       d3   W,           V P                   P                  P                  V4      ,           # V'       d:   V P                   P                  V^ ,          4      ^ ,          '       d   R.V,           pV P                   P                  P                  V4      # )    r   )r`   r   join
splitdrive)r[   drvr-   tails   &&&&r%   r   PurePath._format_parsed_parts  sk    $:

 3 3D 999cjj++DG4Q7754<Dzz~~""4((r$   c                l    V P                  V P                  WV4      4      pWn        W$n        W4n        V# r)   )_from_parsed_stringr   r,   r.   _tail_cached)r1   r   r-   r   r2   s   &&&& r%   rF   PurePath._from_parsed_parts  s4    ''(A(A#T(RS	
 r$   c                J    V P                  V4      pT;'       g    R Vn        V# )r   )rn   r   )r1   path_strr2   s   && r%   r   PurePath._from_parsed_string  s$    !!(+OO	r$   c                J   V'       g   R R . 3# V P                   P                  pV P                   P                  pV'       d   VP                  W24      pV P                   P	                  V4      w  rEpV'       gs   VP                  V4      '       d\   VP                  V4      '       gE   VP                  V4      p\        V4      ^8X  d   V^,          R9  d   TpM\        V4      ^8X  d   TpYEVP                  V4       Uu. uF  q'       g   K  VR8w  g   K  VNK  	  up3# u upi ) z?.r   )	r`   r   altsepreplace	splitroot
startswithendswithr   r6   )	r[   r2   r   r   r   r-   rel	drv_partsxs	   &&       r%   _parse_pathPurePath._parse_path  s    r2:jjnn""<<,D--d33s++CLL4E4E		#I9~"y|4'?Y1$ciinGn1a3h11nGGGGs   ?	D D D c                    V P                   P                  V4      w  r#pV'       g	   V'       d   \        R4      hV P                   P                  pV P                   P                  pV'       d   VP                  We4      pVP                  V4       Uu. uF  qw'       g   K  VR8w  g   K  VNK  	  ppV'       g   \        R\        V4      : 24      hVP                  V4      '       d   VP                  R4       V# u upi )a:  Parse a glob pattern to a list of parts. This is much like
_parse_path, except:

- Rather than normalizing and returning the drive and root, we raise
  NotImplementedError if either are present.
- If the path has no real parts, we raise ValueError.
- If the path ends in a slash, then a final empty part is added.
z%Non-relative patterns are unsupportedr   zUnacceptable pattern: r   )r`   r   NotImplementedErrorr   r   r   r   
ValueErrorrg   r   ra   )	r[   patternr   r-   r   r   r   r   partss	   &&       r%   _parse_patternPurePath._parse_pattern,  s     --g633%&MNNjjnn""++f*CIIcN=NqaAHN=5c'l5EFGG\\#LL >s   	C; C;)C;c                `    \        V 4      P                  V P                  P                  R4      # )zFReturn the string representation of the path with forward (/)
slashes./)rg   r   r`   r   r7   s   &r%   rb   PurePath.as_posixE  s#     4y  #66r$   c                    V P                   p\        V4      ^8X  d
   V^ ,          # V'       d>   V P                  P                  ! V!  pVP	                  4        VP                  V4       V# VP                  R4       R# )   r   )rd   r6   r`   r   clearra   )r1   rh   r2   s   &  r%   	_raw_pathPurePath._raw_pathJ  s_    u:?8O;;##U+DKKMLLKLLr$   c                     V P                   #   \         d>    T P                  T P                  4      w  T n         T n        T n        T P                   u # i ; i)z.The drive prefix (letter or UNC path), if any.)r,   r   r   r   r.   r   r7   s   &r%   r+   PurePath.driveZ  sL    	99 	7;7G7G7W4DItz4#499	    AAAc                     V P                   #   \         d>    T P                  T P                  4      w  T n        T n         T n        T P                   u # i ; i)zThe root of the path, if any.)r.   r   r   r   r,   r   r7   s   &r%   r-   PurePath.rootc  sL    	:: 	7;7G7G7W4DItz4#4::	r   c                     V P                   #   \         d>    T P                  T P                  4      w  T n        T n        T n         T P                   u # i ; ir)   )r   r   r   r   r,   r.   r7   s   &r%   r/   PurePath._taill  sP    	%$$$ 	%7;7G7G7W4DItz4#4$$$	%r   c                <    V P                   V P                  ,           # )z/The concatenation of the drive and root, or ''.)r+   r-   r7   s   &r%   anchorPurePath.anchort  s     zzDII%%r$   c                    V P                   '       g   V P                  '       d9   V P                   V P                  ,           3\        V P                  4      ,           # \        V P                  4      # )zRAn object providing sequence-like access to the
components in the filesystem path.)r+   r-   rB   r/   r7   s   &r%   r   PurePath.partsy  sH     :::JJ*,uTZZ/@@@$$r$   c                    V P                   pV P                  pV P                  pV'       g   V # V P                  WVRR 4      # )zThe logical parent of the path.N)r+   r-   r/   rF   )r1   r   r-   r   s   &   r%   parentPurePath.parent  s@     jjyyzzK&&s$s)<<r$   c                    \        V 4      # )z*A sequence of this path's logical parents.)r'   r7   s   &r%   parentsPurePath.parents  s    
 D!!r$   c                @    V P                   pV'       g   R# VR,          # )z!The final path component, if any.r   r   )r/   )r1   r   s   & r%   rW   PurePath.name  s     zzBxr$   c                v   V P                   pV'       d<   VP                  V9   g+   VP                  '       d   VP                  V9   g   VR8X  d   \        RV: 24      hV P                  P                  4       pV'       g   \        V : R24      hWR&   V P                  V P                  V P                  V4      # )z-Return a new path with the file name changed.r   zInvalid name  has an empty namer   )	r`   r   r   r   r/   copyrF   r+   r-   )r1   rW   pr   s   &&  r%   	with_namePurePath.with_name  s    KKquu}ahh$6F4SV;}TH566zz x'9:;;R&&tzz499dCCr$   c                    V P                   pV'       g   V P                  V4      # V'       g   \        V : R24      hV P                  W,           4      # )z(Return a new path with the stem changed.z has a non-empty suffix)suffixr   r   )r1   stemr   s   && r%   	with_stemPurePath.with_stem  sD    >>$''x'>?@@>>$-00r$   c                    V P                   pV'       g   \        V : R24      hV'       d'   VP                  R4      '       g   \        RV: 24      hV P                  W!,           4      # )zReturn a new path with the file suffix changed.  If the path
has no suffix, add given suffix.  If the given suffix is an empty
string, remove the suffix from the path.
r   r   zInvalid suffix )r   r   r   r   )r1   r   r   s   && r%   with_suffixPurePath.with_suffix  sY    
 yyx'9:;;F--c22vj9::>>$-00r$   c                    V P                   pVP                  R4      pVR8w  d   VRV pVP                  R4      '       d   V# V# )z0The final path component, minus its last suffix.r   Nr   )rW   rfindlstrip)r1   rW   r=   r   s   &   r%   r   PurePath.stem  sE     yyJJsO78D{{3r$   c                t    V P                   P                  R4      pVP                  R4      pVR8w  d   WR # R# )zc
The final component's last suffix, if any.

This includes the leading period. For example: '.txt'
r   Nr   r   )rW   r  r  )r1   rW   r=   s   &  r%   r   PurePath.suffix  s8     yy$JJsO78Or$   c                    V P                   P                  R4      P                  R4      R,           Uu. uF  pRV,           NK  	  up# u upi )zt
A list of the final component's suffixes, if any.

These include the leading periods. For example: ['.tar', '.gz']
r   r   NN)rW   r  r   )r1   exts   & r%   suffixesPurePath.suffixes  sC     &*YY%5%5c%:%@%@%Eb%IJ%Icc		%IJJJs   A	walk_upFc               H   \        VR4      '       g   V P                  V4      p\        \        V.VP                  4      4       Fs  w  r4W@8X  g   W@P                  9   d    MV'       g%   \        \        V 4      : R\        V4      : 24      hVP                  R8X  g   K\  \        R\        V4      : R24      h	  \        \        V 4      : R\        V4      : R24      hR.V,          V P                  \        VP                  4      R ,           pV P                  R	R	V4      # )
a  Return the relative path to another path identified by the passed
arguments.  If the operation is not possible (because this is not
related to the other path), raise ValueError.

The *walk_up* parameter controls whether `..` may be used to resolve
the path.
rn   z is not in the subpath of z..z'..' segment in z cannot be walkedz and z have different anchorsNr   )hasattrrn   	enumerater   r   r   rg   rW   r/   r6   rF   )r1   r   r  stepr2   r   s   &&$   r%   relative_toPurePath.relative_to  s     uo..&&u-E#E5'5==$ABJD|t||3 CI=0J3u:.!YZZd" #3CJ>AR!STT C D	}E#e*?VWXX

3tzz?+; <<&&r2u55r$   c                |    \        VR4      '       g   V P                  V4      pW8H  ;'       g    WP                  9   # )zFReturn True if the path is relative to another path or False.
        rn   )r  rn   r   r   s   &&r%   is_relative_toPurePath.is_relative_to  s8     uo..&&u-E}55 55r$   c                    V P                   \        J d0   V P                   F  pVP                  R4      '       g   K   R# 	  R# V P                   P	                  V 4      # )zKTrue if the path is absolute (has both a root and, if applicable,
a drive).r   TF)r`   r   rd   r   isabsr0   s   & r%   is_absolutePurePath.is_absolute  sJ     ;;)#??3'' ( {{  &&r$   c                    ^ RI pRpVP                  RVRR7       V P                  \        J d   V P                  P	                  V 4      # R# )zYReturn True if the path contains one of the special names reserved
by the system, if any.Nzpathlib.PurePath.is_reserved() is deprecated and scheduled for removal in Python 3.15. Use os.path.isreserved() to detect reserved paths on Windows.zpathlib.PurePath.is_reservedremoveF)      )warnings_deprecatedr`   ntpath
isreserved)r1   r!  msgs   &  r%   is_reservedPurePath.is_reserved	  sJ     	3 	;SQ;;& ;;))$//r$   c                   ^ RI pRpVP                  RVRR7       V P                  4       '       g   \        R4      hV P                  p\        V4      ^8X  d0   V^,          R8X  d"   RV,           pV P                  4       R,          pM(V'       d   R	pV P                  4       pMR
p\        V 4      p^ RIH	p WF! \        P                  ! V4      4      ,           # )Return the path as a URI.Nzlpathlib.PurePath.as_uri() is deprecated and scheduled for removal in Python 3.19. Use pathlib.Path.as_uri().zpathlib.PurePath.as_urir  z.relative path can't be expressed as a file URI:zfile:///   NNzfile:zfile://)quote_from_bytes)r     )r!  r"  r  r   r+   r6   rb   rg   urllib.parser-  rV   r   )r1   r!  r%  r+   prefixr2   r-  s   &      r%   as_uriPurePath.as_uri  s    H6GL!!MNN

u:?uQx3%'F==?2&DF==?D Ft9D1(T):;;;r$   case_sensitiveNc               f   \        VR4      '       g   V P                  V4      pVf   V P                  \        J pV P                  '       d   \        V 4      MRpVP                  '       d   \        V4      MRp\        V P                  P                  VRR7      pVP                  V4      ! V4      RJ# )zp
Return True if this path matches the given glob-style pattern. The
pattern is matched against the entire path.
rn   Nr   T)	recursive)	r  rn   r`   r   r   rg   r   r   compile)r1   r   r3  r2   globbers   &&$  r%   
full_matchPurePath.full_match.  s    
 w00((1G!![[I5N !JJJs4yB")---#g,R .DQw'-T99r$   c               *   \        VR4      '       g   V P                  V4      pVf   V P                  \        J pV P                  RRR1,          pVP                  RRR1,          pV'       g   \        R4      h\        V4      \        V4      8  d   R# \        V4      \        V4      8  d   VP                  '       d   R# \        V P                  P                  V4      p\        W44       F#  w  rgVP                  V4      pV! V4      e   K"   R# 	  R# )z
Return True if this path matches the given pattern. If the pattern is
relative, matching is done from the right; otherwise, the entire path
is matched. The recursive wildcard '**' is *not* supported by this
method.
rn   Nzempty patternFTr   )r  rn   r`   r   r   r   r6   r   r   r   zipr6  )	r1   path_patternr3  
path_partspattern_partsr7  	path_partpattern_partmatchs	   &&$      r%   rA  PurePath.match?  s     |_55--l;L!![[I5NZZ"%
$**4R40_--z?S//z?S//L4G4G4G .A'*:'E#IOOL1EY' (F r$   )r,   r   r   rd   r.   r   r   r   )rd   r,   r.   r   r   r   r   r   )<r   r   r    r!   r"   rO   rV   r2   r`   rY   r3   rn   rq   rx   r|   r   rM   r   r   propertyr   r   r   r   r   r   r   r   r   classmethodr   rF   r   r   r   rb   r   r+   r-   r/   r   r   r   r   rW   r   r   r  r   r   r  r  r  r  r&  r1  r8  rA  r#   rP   rQ   s   @r%   r   r   N   s(    "IF WWF# ,)7""6K!
 	- 	-Y
 / /<
=
<
=
 ) )
 H H$  07
       % % & & % % = = " "  	D	11 	 	 
 
 K K6E 6,6	'
<2:D :"D  r$   c                   "    ] tR tRtRt]tRtRtR# )r   i^  zPurePath subclass for non-Windows systems.

On a POSIX system, instantiating a PurePath should return this object.
However, you can also instantiate it directly on any system.
r   N)	r   r   r    r!   r"   r   r`   rO   r#   r   r$   r%   r   r   ^  s    
 FIr$   c                   "    ] tR tRtRt]tRtRtR# )r   ih  zPurePath subclass for Windows systems.

On a Windows system, instantiating a PurePath should return this object.
However, you can also instantiate it directly on any system.
r   N)	r   r   r    r!   r"   r#  r`   rO   r#   r   r$   r%   r   r   h  s    
 FIr$   c                   x  a  ] tR tRt o RtRJtR t]R 4       tRR/R lt	R t
RR/R	 ltRR/R
 ltRR/R ltR tR tR tR tR tR tR tR tRLR ltR tRMR ltR tRMR lt]P8                  ! ]! ^R4      4      t]P8                  ! ]! RK4      4      tR t R t!R t"RRRR/R  lt#RRRR/R! lt$RNR" lt%R# t&]'R$ 4       t(ROR% lt)]*'       d	   RR/R& lt+MRR/R' lt+],'       d	   RR/R( lt-MRR/R) lt-].! ]/R*4      '       d   R+ t0MR, t0RPR- lt1RQR. lt2RR/R/ lt3R0 t4ROR1 lt5R2 t6R3 t7R4 t8R5 t9R6 t:R7 t;RRR8 lt<ROR9 lt=]>'       d   ]=t?ROR: lt=]/P                  R;8X  d   ROR< ltAMROR= ltAR> tBR? tC].! ]/R@4      '       d   RORA ltDMRORB ltD].! ]/RC4      '       d   RD tEMRE tERF tF]'RG 4       tGRH tH]'RI 4       tIRJtJV tKR# )Sr   ir  a  PurePath subclass that can make system calls.

Path represents a filesystem path but unlike PurePath, also offers
methods to do system calls on path objects. Depending on your system,
instantiating a Path will return either a PosixPath or a WindowsPath
object. You can also instantiate a PosixPath or WindowsPath directly,
but cannot instantiate a WindowsPath on a POSIX system or vice versa.
c                    V \         J d"   \        P                  R 8X  d   \        M\        p \
        P                  V 4      # )rU   )r   rV   rW   r   r   rX   rY   rZ   s   &*,r%   rY   Path.__new__}  s)    $;!#D+iC~~c""r$   c                v     V P                   #   \         d     \        T 4      T n         T P                   u # i ; i)zV
A PathInfo object that exposes the file type and other file attributes
of this path.
)_infor   r   r7   s   &r%   info	Path.info  s5    	:: 	!$DJ::	s    '88follow_symlinksTc               0    \         P                  ! WR7      # )zP
Return the result of the stat() system call on this path, like
os.stat() does.
rN  )rV   statr1   rN  s   &$r%   rQ  	Path.stat  s    
 wwt==r$   c                .    \         P                  ! V 4      # )z~
Like stat(), except if the path points to a symlink, the symlink's
status information is returned, rather than its target's.
)rV   lstatr7   s   &r%   rU  
Path.lstat  s    
 xx~r$   c                   V'       d    \         P                  P                  V 4      # \         P                  P                  V 4      # )z
Whether this path exists.

This method normally follows symlinks; to check whether a symlink exists,
add the argument follow_symlinks=False.
)rV   r2   existslexistsrR  s   &$r%   rX  Path.exists  s-     77>>$''wwt$$r$   c                   V'       d    \         P                  P                  V 4      #  \        V P	                  VR7      P
                  4      #   \        \        3 d     R# i ; i)z#
Whether this path is a directory.
rP  F)rV   r2   isdirr   rQ  st_modeOSErrorr   rR  s   &$r%   is_dirPath.is_dir  sR     77==&&	499_9EMMNN$ 		   $A A#"A#c                   V'       d    \         P                  P                  V 4      #  \        V P	                  VR7      P
                  4      #   \        \        3 d     R# i ; i)zY
Whether this path is a regular file (also True for symlinks pointing
to regular files).
rP  F)rV   r2   isfiler   rQ  r]  r^  r   rR  s   &$r%   is_filePath.is_file  sR    
 77>>$''	499_9EMMNN$ 		ra  c                @    \         P                  P                  V 4      # )z%
Check if this path is a mount point
)rV   r2   ismountr7   s   &r%   is_mountPath.is_mount  s     wwt$$r$   c                @    \         P                  P                  V 4      # )z'
Whether this path is a symbolic link.
)rV   r2   islinkr7   s   &r%   
is_symlinkPath.is_symlink  s     ww~~d##r$   c                @    \         P                  P                  V 4      # )z"
Whether this path is a junction.
)rV   r2   
isjunctionr7   s   &r%   is_junctionPath.is_junction  s     ww!!$''r$   c                z     \        V P                  4       P                  4      #   \        \        3 d     R# i ; i)z&
Whether this path is a block device.
F)r	   rQ  r]  r^  r   r7   s   &r%   is_block_devicePath.is_block_device  5    	499;..//$ 		   "% ::c                z     \        V P                  4       P                  4      #   \        \        3 d     R# i ; i)z*
Whether this path is a character device.
F)r
   rQ  r]  r^  r   r7   s   &r%   is_char_devicePath.is_char_device  ru  rv  c                z     \        V P                  4       P                  4      #   \        \        3 d     R# i ; i)z
Whether this path is a FIFO.
F)r   rQ  r]  r^  r   r7   s   &r%   is_fifoPath.is_fifo  5    	DIIK//00$ 		rv  c                z     \        V P                  4       P                  4      #   \        \        3 d     R# i ; i)z 
Whether this path is a socket.
F)r   rQ  r]  r^  r   r7   s   &r%   	is_socketPath.is_socket  r}  rv  c                   V P                  4       p VP                  4       pVP                  VP                  8H  ;'       d    VP                  VP                  8H  #   \         d#    T P                  T4      P                  4       p Lfi ; i)z_Return whether other_path is the same or not as this file
(as returned by os.path.samefile()).
)rQ  r   rn   st_inost_dev)r1   
other_pathstother_sts   &&  r%   samefilePath.samefile  s{     YY[	=!(H 		X__, - -		X__,	.  	=))*5::<H	=s   A *B	B	Nc                l    RV9  d   \         P                  ! V4      p\         P                  ! WW#WE4      # )zg
Open the file pointed to by this path and return a file object, as
the built-in open() function does.
b)iotext_encodingopen)r1   mode	bufferingencodingerrorsnewlines   &&&&&&r%   r  	Path.open   s.     d?''1Hwwt9HHr$   c                    V P                  R^ R7      ;_uu_ 4       pVP                  4       uuRRR4       #   + '       g   i     R# ; i)z;
Open the file in bytes mode, read it, and close the file.
rb)r  r  N)r  readr1   fs   & r%   
read_bytesPath.read_bytes
  s1     YYDAY..!668 /...s	   7A	c                    \         P                  ! V4      pV P                  RWVR7      ;_uu_ 4       pVP                  4       uuRRR4       #   + '       g   i     R# ; i)z:
Open the file in text mode, read it, and close the file.
rr  r  r  r  N)r  r  r  r  )r1   r  r  r  r  s   &&&& r%   	read_textPath.read_text  sE     ##H-YYC(7YSSWX668 TSSSs   AA	c                    \        V4      pV P                  RR7      ;_uu_ 4       pVP                  V4      uuRRR4       #   + '       g   i     R# ; i)z?
Open the file in bytes mode, write to it, and close the file.
wb)r  N)
memoryviewr  write)r1   dataviewr  s   &&  r%   write_bytesPath.write_bytes  s;    
 $YYDY!!Q774= "!!!s   AA	c                >   \         P                  ! V4      p\        V\        4      '       g'   \	        RVP
                  P                  ,          4      hV P                  RW#VR7      ;_uu_ 4       pVP                  V4      uuRRR4       #   + '       g   i     R# ; i)z>
Open the file in text mode, write to it, and close the file.
zdata must be str, not %swr  N)	r  r  r@   rg   rf   r   r   r  r  )r1   r  r  r  r  r  s   &&&&& r%   
write_textPath.write_text$  sv     ##H-$$$6 NN334 5 5YYC(7YSSWX774= TSSSs   /BB	c              #     "   V P                   P                  p\        V P                  4      pV F*  p\        V4      V8  d   VR,          V8X  d   VRR pVx  K,  	  R# 5i)r   Nr   )r`   r   r6   r   )r1   rh   r   
anchor_lenr   s   &&   r%   _filter_trailing_slashPath._filter_trailing_slash4  sQ     kkoo%
H8}z)hrlc.A#CR=N s   AA c                T    V P                  V4      pW#n        \        V4      Vn        V# r)   )rn   r   r   rK  )r1   	dir_entryr   r2   s   &&& r%   _from_dir_entryPath._from_dir_entry<  s(    !!(+	!),
r$   c                   a  \        S 4      p\        P                  ! V4      ;_uu_ 4       p\        V4      pRRR4       VR8X  d   V 3R lX 4       # V 3R lX 4       #   + '       g   i     L/; i)zYield path objects of the directory contents.

The children are yielded in arbitrary order, and the
special entries '.' and '..' are not included.
Nr   c              3   Z   <"   T F   pSP                  WP                  4      x  K"  	  R # 5ir)   )r  rW   r<   er1   s   & r%   r>   Path.iterdir.<locals>.<genexpr>L  #     EWD((FF33W   (+c              3   Z   <"   T F   pSP                  WP                  4      x  K"  	  R # 5ir)   )r  r2   r  s   & r%   r>   r  N  r  r  )rg   rV   scandirlist)r1   root_dir
scandir_itentriess   f   r%   iterdirPath.iterdirB  sT     t9ZZ!!Z:&G "s?EWEEEWEE "!s   AA.	r3  recurse_symlinksFc               l   \         P                  ! RW4       Vf   V P                  \        J pRpMRpV P	                  V4      pV'       d   RM\
        p\        V P                  P                  W$V4      pVP                  VRRR1,          4      p\        V 4      p	V! V P                  P                  V	R4      4      p
V	R8X  d   \        V P                  V
4      p
VR,          R8X  d   \        V P                  V
4      p
MVR,          R8X  d   V P                  V
4      p
\        V P                  V
4      p
V
# )	zIterate over this subtree and yield all existing files (of any
kind, including directories) matching the given relative pattern.
zpathlib.Path.globNFTr   r   **r   )sysauditr`   r   r   r   r   r   selectorrg   r   map_remove_leading_dot_remove_trailing_slashr  r   )r1   r   r3  r  case_pedanticr   r5  r7  selectr-   rh   s   &&$$       r%   glob	Path.globP  s    			%t5!![[I5N!M
 !M##G,,D2F	 .QZ[!!%"+.4yt{{''b12 3;00%8E9?33U;E2Y$//6ED,,e4r$   c                   \         P                  ! RW4       V P                  P                  RV4      pV P	                  WVR7      # )zRecursively yield all existing files (of any kind, including
directories) matching the given relative pattern, anywhere in
this subtree.
zpathlib.Path.rglobr  )r3  r  )r  r  r`   r   r  )r1   r   r3  r  s   &&$$r%   rglob
Path.rglobn  s=    
 			&6++""41yyRbyccr$   c              #    "   \         P                  ! RWV4       \        V 4      pV'       g   \        P                  p\        P
                  ! WAW#4      pV F+  w  rgpVR8X  d
   VR,          pV P                  V4      Wx3x  K-  	  R# 5i)zBWalk the directory tree from this directory, similar to os.walk().zpathlib.Path.walkr   r+  N)r  r  rg   rV   _walk_symlinks_as_fileswalkr   )	r1   top_downon_errorrN  r  resultsr   dirnames	filenamess	   &&&&     r%   r  	Path.walkw  sr     		%tGt9 88O''(hH-4)H	3#B<**84hII .5s   BBc                ,   V P                  4       '       d   V # V P                  '       d`   \        P                  P	                  \        P
                  ! 4       4      ^ ,          pV P                  WP                  V P                  4      # V P                  '       d+   \        P                  P                  V P                  4      pM\        P
                  ! 4       pV P                  '       g   V P                  V4      # \        P                  P	                  V4      w  rpV'       g   V P                  WV P                  4      # VP                  V P                  P                  4      pVP                  V P                  4       V P                  WV4      # )zReturn an absolute version of this path
No normalization or symlink resolution is performed.

Use resolve() to resolve symlinks and remove '..' segments.
)r  r-   rV   r2   r   getcwdrF   r/   r+   abspathr   r   r`   r   rc   )r1   r+   cwdr-   r   r   s   &     r%   absolutePath.absolute  s    K999GG%%biik215E**5))TZZHH:::''//$**-C))+Czzz ++C0077,,S1S**5

CCyy)DJJ&&uD99r$   c                L    \         P                  ! 4       pV ! V4      pWn        V# )z<Return a new path pointing to the current working directory.)rV   r  r   )r[   r  r2   s   &  r%   r  Path.cwd  s"     iik3x	r$   c                `    V P                  \        P                  P                  WR7      4      # )zT
Make the path absolute, resolving all symlinks on the way and also
normalizing it.
)strict)rn   rV   r2   realpath)r1   r  s   &&r%   resolvePath.resolve  s'     !!"''"2"24"2"GHHr$   c               z    V P                  VR7      P                  p\        P                  ! V4      P                  # )*
Return the login name of the file owner.
rP  )rQ  st_uidpwdgetpwuidpw_name)r1   rN  uids   &$ r%   owner
Path.owner  /     ))O)<CCC<<$,,,r$   c               N    \        V 4      P                   R2p\        V R24      h)r  z.owner() is unsupported on this systemrL   r   r   r1   rN  r  s   &$ r%   r  r    .     :&&'x0A&!,J'KLLr$   c               z    V P                  VR7      P                  p\        P                  ! V4      P                  # )(
Return the group name of the file gid.
rP  )rQ  st_gidgrpgetgrgidgr_name)r1   rN  gids   &$ r%   group
Path.group  r  r$   c               N    \        V 4      P                   R2p\        V R24      h)r  z.group()r  r  r  s   &$ r%   r  r     r  r$   readlinkc                L    V P                  \        P                  ! V 4      4      # )4
Return the path to which the symbolic link points.
)rn   rV   r  r7   s   &r%   r  Path.readlink  s     %%bkk$&788r$   c                N    \        V 4      P                   R2p\        V R24      h)r  z.readlink()r  r  r  s   & r%   r  r    s.     :&&'{3A&!,J'KLLr$   c                N   V'       d    \         P                  ! V R4       R# \         P                  \         P                  ,          pV'       g   V\         P
                  ,          p\         P                  ! WV4      p\         P                  ! V4       R#   \         d     Li ; i)zC
Create this file with the given access mode, if it doesn't exist.
N)rV   utimer^  O_CREATO_WRONLYO_EXCLr  close)r1   r  exist_okflagsfds   &&&  r%   touch
Path.touch  sq    
 t$
 

R[[(RYYEWWT$'
  s   B B$#B$c                F    \         P                  ! W4       R#   \         dP    T'       d   T P                  T 8X  d   h T P                  P                  RRR7       T P                  TRTR7        R# \         d$    T'       d   T P                  4       '       g   h  R# i ; i)z,
Create a new directory at this given path.
T)r   r  FN)rV   mkdirFileNotFoundErrorr   r^  r_  )r1   r  r   r  s   &&&&r%   r  
Path.mkdir  s{    	HHT   	?dkkT1KKdT:JJtUXJ> 	 4;;== $1	s-    B AB 3B <B B B B c               6    \         P                  ! WVR7       R# )z6
Change the permissions of the path, like os.chmod().
rP  N)rV   chmod)r1   r  rN  s   &&$r%   r  
Path.chmod  s     	_=r$   c                ,    V P                  VRR7       R# )zx
Like chmod(), except if the path points to a symlink, the symlink's
permissions are changed, rather than its target's.
FrP  N)r  )r1   r  s   &&r%   lchmodPath.lchmod
  s    
 	

4
/r$   c                j     \         P                  ! V 4       R#   \         d    T'       g   h  R# i ; i)zL
Remove this file or link.
If the path is a directory, use rmdir() instead.
N)rV   unlinkr  )r1   
missing_oks   &&r%   r  Path.unlink  s,    
	IIdO  	 	s    222c                2    \         P                  ! V 4       R# )z6
Remove this directory.  The directory must be empty.
N)rV   rmdirr7   s   &r%   r!  
Path.rmdir  s     	r$   c                    V P                  4       '       g   V P                  4       '       d   V P                  4        R# V P                  4       '       d   ^ RIpVP                  V 4       R# V P                  4        R# )z@
Delete this file or directory (including all sub-directories).
N)rl  rp  r  r_  shutilrmtree)r1   r$  s   & r%   _deletePath._delete"  sK     ?? 0 0 2 2KKM[[]]MM$KKMr$   c                x    \         P                  ! W4       \        VR4      '       g   V P                  V4      pV# )a  
Rename this path to the target path.

The target path may be absolute or relative. Relative paths are
interpreted relative to the current working directory, *not* the
directory of the Path object.

Returns the new Path instance pointing to the target path.
rn   )rV   renamer  rn   r1   targets   &&r%   r)  Path.rename/  s2     			$v//''/Fr$   c                x    \         P                  ! W4       \        VR4      '       g   V P                  V4      pV# )a#  
Rename this path to the target path, overwriting if that path exists.

The target path may be absolute or relative. Relative paths are
interpreted relative to the current working directory, *not* the
directory of the Path object.

Returns the new Path instance pointing to the target path.
rn   )rV   r   r  rn   r*  s   &&r%   r   Path.replace>  s2     	

4 v//''/Fr$   c                    \        VR4      '       g   V P                  V4      p\        W4       VP                  ! V 3/ VB  VP	                  4       # )zH
Recursively copy this file or directory tree to the given destination.
rn   )r  rn   r   
_copy_fromrq   )r1   r+  r]   s   &&,r%   r   	Path.copyM  sI     v//''/Fd+$)&)  r$   c                    V P                   pV'       g   \        V : R24      h\        VR4      '       d
   W,          pMV P                  W4      pV P                  ! V3/ VB # )zE
Copy this file or directory tree into the given existing directory.
r   rn   )rW   r   r  rn   r   )r1   
target_dirr]   rW   r+  s   &&,  r%   	copy_intoPath.copy_intoW  s\     yyx'9:;;Z11&F''
9Fyy*6**r$   c                   V'       g4   VP                   P                  4       '       d   V P                  W4       R# VP                   P                  4       '       d}   VP	                  4       p\
        P                  ! V 4       V F.  pV P                  VP                  4      P                  WRV4       K0  	  V'       d   \        VP                   V 4       R# R# V P                  W4       R# )z/
Recursively copy the given path to this path.
N)rL  rl  _copy_from_symlinkr_  r  rV   r  rq   rW   r0  r   _copy_from_file)r1   sourcerN  preserve_metadatachildrenchilds   &&&&  r%   r0  Path._copy_fromd  s     6;;#9#9#;#;##F>[[!!~~'HHHTN!ejj)44,=? " !&++t, !   ;r$   c           	     2   \        W4       \        VR 4      ;_uu_ 4       p\        V R4      ;_uu_ 4       p\        W44       RRR4       RRR4       V'       d   \	        VP
                  V 4       R# R#   + '       g   i     L:; i  + '       g   i     LE; i)r  r  N)r   r   r  r   r   rL  )r1   r9  r:  source_ftarget_fs   &&&  r%   r8  Path._copy_from_fileu  sd    v,%%dD!!XH/ " & fkk4(  "! &%s"   BA3	B3B>BB	c                     \         P                  ! V4      p\        V\        V 4      4       R #   \         d     Mi ; iT P                  Y4       R # r)   )rV   re   r   rg   rf   _copy_from_file_fallbackr1   r9  r:  s   &&&r%   r8  rA    sL    6* &#d),	  
 ))&Ds   / ==rU   c                    \         P                  ! \        VP                  4       4      WP                  P                  4       4       V'       d   \        VP                  V R R7       R# R# FrP  N)rV   symlinkrg   r  rL  r_  r   rD  s   &&&r%   r7  Path._copy_from_symlink  sA    JJs6??,-t[[5G5G5IJ &++tUC !r$   c                    \         P                  ! \        VP                  4       4      V 4       V'       d   \	        VP
                  V R R7       R# R# rF  )rV   rG  rg   r  r   rL  rD  s   &&&r%   r7  rH    s4    JJs6??,-t4 &++tUC !r$   c                T    V P                  V4      p\        W4        \        P                  ! W4       VP	                  4       #   \
         d!   pTP                  \        8w  d   h  Rp?MRp?ii ; i  \         d     Mi ; iT P                  TRRR7      pT P                  4        T# )zH
Recursively move this file or directory tree to the given destination.
NFT)rN  r:  )rn   r   rV   r   rq   r^  errnoEXDEVrf   r   r&  )r1   r+  errs   && r%   move	Path.move  s    
	)''/F #40)

4(
 ((	  99% &  		 65DQs(   A3 A A0A++A03B Bc                    V P                   pV'       g   \        V : R24      h\        VR4      '       d
   W,          pMV P                  W4      pV P	                  V4      # )zE
Move this file or directory tree into the given existing directory.
r   rn   )rW   r   r  rn   rN  )r1   r3  rW   r+  s   &&  r%   	move_intoPath.move_into  sW     yyx'9:;;Z11&F''
9Fyy  r$   rG  c                4    \         P                  ! WV4       R# )
Make this path a symlink pointing to the target path.
Note the order of arguments (link, target) is the reverse of os.symlink.
N)rV   rG  )r1   r+  target_is_directorys   &&&r%   
symlink_toPath.symlink_to  s    
 JJv%89r$   c                N    \        V 4      P                   R2p\        V R24      h)rT  z.symlink_to()r  r  )r1   r+  rU  r  s   &&& r%   rV  rW    s.    
 :&&'}5A&!,J'KLLr$   linkc                2    \         P                  ! W4       R# )
Make this path a hard link pointing to the same file as *target*.

Note the order of arguments (self, target) is the reverse of os.link's.
N)rV   rY  r*  s   &&r%   hardlink_toPath.hardlink_to  s     GGF!r$   c                N    \        V 4      P                   R2p\        V R24      h)r[  z.hardlink_to()r  r  )r1   r+  r  s   && r%   r\  r]    s.     :&&'~6A&!,J'KLLr$   c                   V P                   '       g   V P                  '       g   V P                  '       d   V P                  ^ ,          R,          R8X  d   \        P                  P                  V P                  ^ ,          4      pVR,          R8X  d   \        R4      hV P                  V4      w  r#pV P                  W#W@P                  R,          ,           4      # V # )z[Return a new path with expanded ~ and ~user constructs
(as returned by os.path.expanduser)
:Nr   N~#Could not determine home directory.r
  )	r+   r-   r/   rV   r2   
expanduserRuntimeErrorr   rF   )r1   homedirr   r-   r   s   &    r%   rb  Path.expanduser  s     tyyyJJJ4::a=,3gg((A7Gr{c!"#HII"..w7OCt**3dZZ^6KLLr$   c                t    \         P                  P                  R4      pVR8X  d   \        R4      hV ! V4      # )z7Return a new path pointing to expanduser('~').
        r`  ra  )rV   r2   rb  rc  )r[   rd  s   & r%   home	Path.home  s5     ''$$S)c>DEE7|r$   c                v    V P                  4       '       g   \        R4      h^ RIHp V! \	        V 4      RR7      # )r)  z.relative paths can't be expressed as file URIs)pathname2urlT)
add_scheme)r  r   urllib.requestrj  rg   )r1   rj  s   & r%   r1  Path.as_uri  s1    !!MNN/CI$77r$   c                    ^ RI Hp ^ RIHp  V ! V! VRR7      4      pTP                  4       '       g   \	        RT: 24      hT#   T d   p\	        TP
                  4      RhRp?ii ; i)z,Return a new path from the given 'file' URI.)URLError)url2pathnameT)require_schemeNzURI is not absolute: )urllib.errorro  rl  rp  r   reasonr  )r[   uriro  rp  r2   excs   &&    r%   from_uriPath.from_uri  sl     	*/	3|C=>D !!4SG<==	  	3SZZ(d2	3s   A A'A""A')rK  r   )r  r   NNN)NNN)TNF)F)i  T)i  FF)TF)Lr   r   r    r!   r"   rO   rY   rC  rL  rQ  rU  rX  r_  rd  rh  rl  rp  rs  rx  r{  r  r  r  r  r  r  r  operator
itemgetterrA   r  r  r  r  r  r  r  r  r  rD  r  r  r  r  r  r  r  rV   r  r  r  r  r  r  r!  r&  r)  r   r   r4  r0  r8  r   rC  rW   r7  rN  rQ  rV  r\  rb  rg  r1  rv  r#   rP   rQ   s   @r%   r   r   r  sg     I#
 	 	>d >	% 	%	 	
 
%$(
.I!! #--eAtn=%00r;Fd U <dt de d
J:<  I 	-4 	-	M4 	M 	-4 	-	M4 	M r:	9	M,">T >0	!+<") #2 	E 
ww$	D
	D
.! r9	:	M r6	"	M  8 
 
r$   c                   \   a  ] tR tRt o RtRt]P                  R8X  d
   R tRt	V t
R# Rt	V t
R# )r   i
  zkPath subclass for non-Windows systems.

On a POSIX system, instantiating a Path should return this object.
rU   c                6    \        R V P                  : R24      hzcannot instantiate z on your systemr   r   rZ   s   &*,r%   rY   PosixPath.__new__  "    &%cll%5_EG Gr$   r   Nr   r   r    r!   r"   rO   rV   rW   rY   r#   rP   rQ   s   @r%   r   r   
  -      I	ww$	G 	G r$   c                   \   a  ] tR tRt o RtRt]P                  R8w  d
   R tRt	V t
R# Rt	V t
R# )r   i  ziPath subclass for Windows systems.

On a Windows system, instantiating a Path should return this object.
rU   c                6    \        R V P                  : R24      hr|  r}  rZ   s   &*,r%   rY   WindowsPath.__new__  r  r$   r   Nr  rQ   s   @r%   r   r     r  r$   )r   r   r   r   r   r   r   ).r"   r  r#  rx  rV   r   r  rK  r  r   r   	itertoolsr   rQ  r   r   r   r	   r
   r   _collections_abcr   r  ImportErrorr  pathlib._osr   r   r   r   r   r   r   r   __all__r   r   r'   r   PathLikeregisterr   r   r   r   r   r   r$   r%   <module>r     s   
   	  
  5  G G %  	. 	@8 @:I IZ   X H h U
8 U
p
Gm 
G
G$ 
GA(  
C  
Cs$   C 
C+ 	C('C(+	C76C7