+
    iF  c                   st   R t ^ RI5 ^ RIHtHt ^ RIHtHtHtH	t	 ^ RI
t
^ RIt ^ RIt ^ RIt ^ RItR t]'       d   ]! ]R4      '       d   R tMRt]'       d   ]! ]R4      '       d   R	 tMRt]! ]
R
4      '       d   R tMRt]! ]
R4      '       d   R tMRt]'       d   ]! ]R4      '       d   R tMRtR tRR ltR tR tRR lt ! R R4      t ! R R]4      t ! R R]4      t]
P>                  R8X  d   ]M]t  ! R R]4      t!R#   ] d    Rt Li ; i  ] d    Rt Li ; i  ] d    Rt ELi ; i) z6
Low-level OS functionality wrappers used by pathlib.
)Z*)TextIOWrappertext_encoding)S_ISDIRS_ISREGS_ISLNKS_IMODENc                s     \        \        P                  ! V 4      P                  R4      p\
        P                  R8  d   \        VR4      pV#   \         d    Rp L2i ; i)aN  Determine blocksize for fastcopying on Linux.
Hopefully the whole file will be copied in a single call.
The copying itself should be performed in a loop 'till EOF is
reached (0 return) so a blocksize smaller or bigger than the actual
file size should not make any difference, also in case the file
content changes while being copied.
i   i   l        i   @)ZmaxosZfstatZst_sizeOSErrorsysZmaxsizeZmin)Zinfd	blocksize   & $/usr/lib64/python3.14/pathlib/_os.py_get_copy_blocksizer      sW    ..8	
 {{W	7+	  	s   *A AAFICLONEc                sR    \         P                  ! V\         P                  V 4       R# )z
Perform a lightweight copy of two files, where the data blocks are
copied only when modified. This is known as Copy on Write (CoW),
instantaneous copy or reflink.
N)fcntlZioctlr   	source_fd	target_fd   &&r   _ficloner   ,   s     	Iu}}i8    
_fcopyfilec                sP    \         P                  ! W\         P                  4       R# )zR
Copy a regular file content using high-performance fcopyfile(3)
syscall (macOS).
N)posixr   Z_COPYFILE_DATAr   r   r   r   r   8   s    
 	u/C/CDr   copy_file_rangec                sv    \        V 4      p^ p \        P                  ! WVVR7      pV^ 8X  d   R# W4,          pK-  )z
Copy data from one regular mmap-like fd to another by using a
high-performance copy_file_range(2) syscall that gives filesystems
an opportunity to implement the use of reflinks or server-side
copy.
This should work on Linux >= 4.5 only.
)Z
offset_dstN)r   r   r   r   r   r	   ZoffsetZsent   &&   r   _copy_file_ranger   C   s>     (	2	%%iI179DqyNFr   sendfilec                sr    \        V 4      p^ p \        P                  ! WW24      pV^ 8X  d   R# W4,          pK+  )zCopy data from one regular mmap-like fd to another by using
high-performance sendfile(2) syscall.
This should work on Linux >= 2.6.33 only.
N)r   r   r   r   r   r   	_sendfiler   X   s7    
 (	2	;;yVGDqyNFr   	CopyFile2c                s4    \         P                  ! W^ 4       R# )z?
Copy from one file to another using CopyFile2 (Windows only).
N)_winapir   )sourcetargetr   r   	copyfile2r!   i   s     	&!,r   c                s    V P                  4       pVP                  4       p \        '       d    \        W#4       R# \        '       d    \        W#4       R# \        '       d    \        W#4       R# \        '       d    \        W#4       R#  T P$                  pTP&                  pT! R4      ;p'       d   T! T4       K  R#   \         d2   pTP                  \        \
        \        \        39  d   Th Rp?LRp?ii ; i  \         d(   pTP                  \        \        39  d   Th Rp?LRp?ii ; i  \         d(   pTP                  \        \        39  d   Th Rp?LRp?ii ; i  \         d#   pTP                  \        8w  d   Th Rp?ELRp?ii ; i  \         d*   pT P                  Tn        TP                  Tn        ThRp?ii ; i  \"         d     ELRi ; i)zH
Copy data from file-like object source_f to file-like object target_f.
Ni   )Zfilenor   r   errnoZEBADF
EOPNOTSUPPZETXTBSYZEXDEVr   EINVALENOTSUPr   r   ZENOTSOCKnamefilename	filename2Z	ExceptionZreadZwrite)Zsource_fZtarget_fr   r   errZread_sourceZwrite_targetZbufs   &&      r   copyfileobjr*   r   s   *OO%	OO%	$	x"Y2 z"y4  "$Y: y"i3  --K>>L[)
)#
)S *G  "yy
GU(KK!	 L"  "yy(99!	 :"  "yy%(88!	 9"  "yyH,!	 -"  	#==CL$MMCMI		G  s    G F C  F 
C? F $D4 1F >E)  C<'C72F 7C<<F ?D1
D,'F ,D11F 4E&?E!F !E&&F )F4FF FF G$$GGGGc                s@   RV9  pV'       d   \        V4      p \        WW#WE4      #   \         d     Mi ; i\        T 4      pRP	                  \        R T 4       4      4      pT'       d-    \        TRT R24      pT! YY4T4      #   \         d     M1i ; iTe   \        R4      hTe   \        R4      hTe   \        R4      h \        TRT R	24      pT! Y4      p	T'       d   \        YYE4      p	T	#   \         d     Mi ; i\        TP                   R
T: 24      h)zg
Open the file pointed to by this path and return a file object, as
the built-in open() function does.
ZbZ c              3   s6   "   T F  qR 9  g   K  Vx  K  	  R# 5i)ZbtN )Z.0Zcr
   r   Z	<genexpr>Zmagic_open.<locals>.<genexpr>   s     ;Td]!!Ts   
Z__open_Z__z-binary mode doesn't take an encoding argumentz+binary mode doesn't take an errors argumentz+binary mode doesn't take a newline argumentZb__z can't be opened with mode )r   ZopenZ	TypeErrorZtypeZjoinZsortedZgetattrAttributeError
ValueErrorr    __name__)
pathZmodeZ	bufferingZencodingZerrorsZnewlineZtextZclsattrZstreams
   &&&&&&    r   
magic_openr1      sJ    d?D !*D	VEE 
t*C776;T;;<D	D3'$r 23D 7CC  		 
	HII		FGG		FGGsgdV3/0 d&"6VEF   s||n$?xH
IIs0   ' 55-B BBC4 4DDc                s    W8X  d   \        \        R4      pM#WP                  9   d   \        \        R4      pMR# \        V 4      Vn        \        V4      Vn        Vh)z>
Raise OSError(EINVAL) if the other path is within this path.
z#Source and target are the same pathz&Source path is a parent of target pathN)r   r$   Zparentsstrr'   r(   )r   r    r)   s   && r   ensure_distinct_pathsr3      sL     fCD	>>	!fFGv;CLKCM
Ir   c                sN    V P                   P                  pVP                   P                  p V! 4       V! 4       8w  d   R#  \        \
        R4      p\        T 4      Tn        \        T4      Tn        Th  \        \        3 d     R# i ; i  \         d    Y8w  d    R#  L`i ; i)z=
Raise OSError(EINVAL) if both paths refer to the same file.
Nz#Source and target are the same file)	info_file_idr   r-   r,   r$   r2   r'   r(   )r   r    Zsource_file_idZtarget_file_idr)   r   r   ensure_different_filesr6      s    ----
	>#33 4 &?
@Cv;CLKCM
I $ 		   s"   ,B A5 5B
	B
B$#B$c                st   \        V R4      ;'       d@    \        V R4      ;'       d,    T;'       g"    \        P                  \        P                  9   pV'       d?   V P	                  VR7      pV P                  VR7      p\        P                  ! WV3VR7       \        V R4      ;'       dD    \        \        R4      ;'       d,    T;'       g"    \        P                  \        P                  9   pV'       d7   V P                  VR7      pV F  w  r \        P                  ! WWR7       K   	  \        V R4      ;'       d,    T;'       g"    \        P                  \        P                  9   pV'       d,   V P!                  VR7      p \        P                  ! WVR7       \        V R	4      ;'       dD    \        \        R
4      ;'       d,    T;'       g"    \        P$                  \        P                  9   pV'       d.   V P'                  VR7      p \        P$                  ! WVR7       R# R#   \         d8   p
T
P                  \        \        \        \        \        39  d   h  Rp
?
EK_  Rp
?
ii ; i  \"         d     Li ; i  \         d(   pTP                  \(        \        39  d   h  Rp?R# Rp?ii ; i)z>Copy metadata from the given PathInfo to the given local path._access_time_ns_mod_time_nsfollow_symlinks)Znsr:   _xattrssetxattrN_posix_permissions
_bsd_flagschflags)hasattrr   ZutimeZsupports_follow_symlinksr7   r8   r<   r;   r   r"   EPERMr%   ENODATAr$   EACCESZchmodr=   ZNotImplementedErrorr?   r>   r#   )r4   r    r:   Zcopy_times_nsZt0Zt1Zcopy_xattrsZxattrsr0   ZvalueZeZcopy_posix_permissionsZposix_permissionsZcopy_bsd_flagsZ	bsd_flagsZwhys   &&&             r   	copy_inforD      s]    	'( 	E 	En%	E 	E		C	CBHH(C(CC  !!/!B?
HoF
 	i  	H 	HJ	H 	H		F	FBKK2+F+FF  o>!KDF%Q " 	*+ 	E 	E		C	CBHH(C(CC   33O3T	HHVP 	l# 	G 	GI	G 	G		E	EBJJ"*E*EE  OOOOD		JJv/J 9  775'7FF"KK L # 	 	*  	yyW 55 6	sB   H/	I4 J /I1:+I,,I14JJJ7J22J7c                   s   a  ] tR tRt o RtR tR tRRRR/R ltRR/R	 ltRR/R
 lt	RR/R lt
RR/R lt]! ]P                  R4      '       d   RR/R lt]! ]R4      '       d   RR/R ltRtV tR# RtV tR# )_PathInfoBasei:  c                s&    \        V4      V n        R # N)r2   _path)selfr/   r   r   __init__Z_PathInfoBase.__init__=  s    Y
r   c                s@    \         P                  R 8X  d   RMRpRV R2# )ntZWindowsPathZ	PosixPathZ<z.info>)r   r&   )rH   Z	path_typer
   r   __repr__Z_PathInfoBase.__repr__@  s"    %'WW_M+	9+V$$r   r:   Tignore_errorsFc               sV   V'       dO    V P                   pV'       g   Ve   V#   \        P                  ! V P                  4      V n         V P                   #  V P                  pV'       g   Ve   V#   \        P                  ! V P                  4      V n        V P                  #   \         d     Li ; i  \
        \        3 d    RT n         T'       g   h  T P                   # i ; i  \         d     Li ; i  \
        \        3 d    RT n        T'       g   h  T P                  # i ; i)zZReturn the status as an os.stat_result, or None if stat() fails and
ignore_errors is true.N)	_stat_resultr,   r   statrG   r   r-   _lstat_resultZlstat)rH   r:   rL   Zresults   &$$ r   _statZ_PathInfoBase._statD  s.    "** !F$6!M %7$&GGDJJ$7!
 $$$"++ !F$6!M %7%'XXdjj%9"
 %%%5 "  Z( $(!$ %$$$	 "  Z( %)"$ %%%%	sR   B% %B6 C( 4%C9 %B32B36C%C%$C%(C65C69D(D('D(c               sL    \        V P                  VR7      P                  4      # )z"Return the POSIX file permissions.r9   )r   rP   st_moderH   r:      &$r   r=   Z _PathInfoBase._posix_permissionsf  s    tzz/zBJJKKr   c               sV    V P                  VR7      pVP                  VP                  3# )z#Returns the identifier of the file.r9   )rP   Zst_devZst_inorH   r:   st   &$ r   r5   Z_PathInfoBase._file_idj  s%    ZZZ8yy"))##r   c               :    V P                  VR7      P                  # )z&Return the access time in nanoseconds.r9   )rP   Zst_atime_nsrR   rS   r   r7   Z_PathInfoBase._access_time_nso      zz/z:FFFr   c               rW   )z&Return the modify time in nanoseconds.r9   )rP   Zst_mtime_nsrR   rS   r   r8   Z_PathInfoBase._mod_time_nss  rX   r   st_flagsc               rW   )zReturn the flags.r9   )rP   rY   rR   rS   r   r>   Z_PathInfoBase._bsd_flagsx  s    ::o:>GGGr   	listxattrc          
     s@    \         P                  ! V P                  VR7       Uu. uF'  pV\         P                  ! V P                  W!R7      3NK)  	  up# u upi   \         d8   pTP
                  \        \        \        \        \        39  d   h . u Rp?# Rp?ii ; i)zmReturn the xattrs as a list of (attr, value) pairs, or an empty
list if extended attributes aren't supported.r9   N)r   rZ   rG   Zgetxattrr   r"   rA   r%   rB   r$   rC   )rH   r:   r0   r)   s   &$  r   r;   Z_PathInfoBase._xattrs}  s     !#TZZ Y[ Y 2;;tzz4YZ Y[ [ [  99UGWff$MM	s.   $A -AA A B&,BBB)rO   rG   rM   N)rG   rM   rO   )r.   
__module____qualname____firstlineno__	__slots__rI   rK   rP   r=   r5   r7   r8   r@   r   Zstat_resultr>   r;   __static_attributes____classdictcell____classdict__   @r   rE   rE   :  s     :I% &t  &5  &DLD L$$ $
G GGd G r~~z**	H 	H r;
	T 
	 
	  r   rE   c                   X   a  ] tR tRt o RtR	tRR/R ltRR/R ltRR/R ltR t	R	t
V tR
# )_WindowsPathInfoi  zImplementation of pathlib.types.PathInfo that provides status
information for Windows paths. Don't try to construct it yourself.r:   Tc               s   V'       g   V P                  4       '       d   R#  V P                  #   \         dS    \        P                  P                  T P                  4      '       d   RT n         R# R;T n        ;T n        T n         R# i ; i)Whether this path exists.TF)	
is_symlink_existsr,   r   r/   existsrG   _is_dir_is_filerR   rS   r   ri   Z_WindowsPathInfo.exists  sk    4??#4#4	<< 	ww~~djj))#>CCCt|dm	s   . 9B(B2B
Bc                  V'       g   V P                  4       '       d   R#  V P                  #   \         dL    \        P                  P                  T P                  4      '       d   R;T n        T n         R# RT n         R# i ; i)!Whether this path is a directory.FT)rg   rj   r,   r   r/   ZisdirrG   rh   rR   rS   r   is_dirZ_WindowsPathInfo.is_dir  sd    4??#4#4	<< 	ww}}TZZ((.22t|$	   . 9B(B9BBc               rl   )$Whether this path is a regular file.FT)rg   rk   r,   r   r/   ZisfilerG   rh   rR   rS   r   is_fileZ_WindowsPathInfo.is_file  sd    4??#4#4	==  	ww~~djj))/33 %	ro   c                s     V P                   #   \         d>    \        P                  P	                  T P
                  4      T n         T P                   u # i ; i)%Whether this path is a symbolic link.)_is_symlinkr,   r   r/   ZislinkrG   rH      &r   rg   Z_WindowsPathInfo.is_symlink  sG    	$### 	$!ww~~djj9D###	$s    AAA)rh   rj   rk   rs   Nr.   r[   r\   r]   __doc__r^   ri   rn   rq   rg   r_   r`   ra   rc   r   re   re     s>     JAI   $ $r   re   c                   rd   )_PosixPathInfoi  z~Implementation of pathlib.types.PathInfo that provides status
information for POSIX paths. Don't try to construct it yourself.r:   Tc               s8    V P                  VRR7      pVf   R# R# )rf   Tr:   rL   FrP   rT   rV   r   ri   Z_PosixPathInfo.exists  s    ZZtZL:r   c               ^    V P                  VRR7      pVf   R# \        VP                  4      # )rm   Try   F)rP   r   rQ   rT   rV   r   rn   Z_PosixPathInfo.is_dir  +    ZZtZL:rzz""r   c               r{   )rp   Try   F)rP   r   rQ   rT   rV   r   rq   Z_PosixPathInfo.is_file  r|   r   c                s^    V P                  RRR7      pVf   R# \        VP                  4      # )rr   FTry   )rP   r   rQ   )rH   rU   r
   r   rg   Z_PosixPathInfo.is_symlink  s+    ZZTZB:rzz""r   r+   Nrv   ra   rc   r   rx   rx     s>     HI # ## ## #r   rx   rJ   c                   s|   a a ] tR tRt oRtRtV 3R ltRRRR/R ltRR/R	 ltRR/R
 lt	RR/R lt
R tRtVtV ;t# )DirEntryInfoi  zImplementation of pathlib.types.PathInfo that provides status
information by querying a wrapped os.DirEntry object. Don't try to
construct it yourself.c                sF   < \         SV `  VP                  4       Wn        R # rF   )ZsuperrI   r/   _entry)rH   Zentry	__class__s   &&r   rI   ZDirEntryInfo.__init__  s    $r   r:   TrL   Fc               sr     V P                   P                  VR 7      #   \         d    T'       g   h  R# i ; i)r9   N)r~   rN   r   )rH   r:   rL   s   &$$r   rP   ZDirEntryInfo._stat  s7    	;;##O#DD 	 	s    666c               s>    V'       g   R# V P                  RR7      RJ# )rf   T)rL   Nrz   rR   rS   r   ri   ZDirEntryInfo.exists  s    zzz-T99r   c               `     V P                   P                  VR7      #   \         d     R# i ; i)rm   r9   F)r~   rn   r   rR   rS   r   rn   ZDirEntryInfo.is_dir  s1    	;;%%o%FF 		    --c               r   )rp   r9   F)r~   rq   r   rR   rS   r   rq   ZDirEntryInfo.is_file  s1    	;;&&&GG 		r   c                s\     V P                   P                  4       #   \         d     R# i ; i)rr   F)r~   rg   r   rt   ru   r   rg   ZDirEntryInfo.is_symlink  s,    	;;))++ 		s    ++)r~   )r.   r[   r\   r]   rw   r^   rI   rP   ri   rn   rq   rg   r_   r`   Z__classcell__)r   rb   s   @@r   r}   r}     sW      It 5 : :   r   r}   )ZriNNN)T)"rw   r"   Zior    r   rN   r   r   r   r   r   r   r   ZImportErrorr   r   r   r@   r   r   r   r   r!   r*   r1   r3   r6   rD   rE   re   rx   r&   ZPathInfor}   r+   r   r   <module>r      sp    + 3 3 	 

& 	WUI&&9 H 	WUL))E J 2 !!"  2z I ww,,- I4n)JX(,8vM M`5$} 5$p#] #D  "ww$N+= +w  E  E  Gs3   D D D* 	DD	D'&D'*	D76D7