+
     BiF                     t   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.
)*)TextIOWrappertext_encoding)S_ISDIRS_ISREGS_ISLNKS_IMODENc                     \        \        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   @)maxosfstatst_sizeOSErrorsysmaxsizemin)infd	blocksizes   & "/usr/lib/python3.14/pathlib/_os.py_get_copy_blocksizer      sW    ..8	
 {{W	7+	  	s   *A AAFICLONEc                R    \         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)fcntlioctlr   	source_fd	target_fds   &&r   _ficloner   ,   s     	Iu}}i8    
_fcopyfilec                P    \         P                  ! W\         P                  4       R# )zR
Copy a regular file content using high-performance fcopyfile(3)
syscall (macOS).
N)posixr   _COPYFILE_DATAr   s   &&r   r   r   8   s    
 	u/C/CDr   copy_file_rangec                v    \        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.
)
offset_dstN)r   r   r#   r   r   r   offsetsents   &&   r   _copy_file_ranger)   C   s>     (	2	%%iI179DqyNFr   sendfilec                r    \        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&   s   &&   r   	_sendfiler,   X   s7    
 (	2	;;yVGDqyNFr   	CopyFile2c                4    \         P                  ! W^ 4       R# )z?
Copy from one file to another using CopyFile2 (Windows only).
N)_winapir-   )sourcetargets   &&r   	copyfile2r2   i   s     	&!,r   c                    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   )filenor   r   errnoEBADF
EOPNOTSUPPETXTBSYEXDEVr   EINVALENOTSUPr)   r,   ENOTSOCKnamefilename	filename2	Exceptionreadwrite)source_ftarget_fr   r   errread_sourcewrite_targetbufs   &&      r   copyfileobjrI   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                @   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.
b c              3   6   "   T F  qR 9  g   K  Vx  K  	  R# 5i)btN ).0cs   & r   	<genexpr>magic_open.<locals>.<genexpr>   s     ;Td]!!Ts   
__open___z-binary mode doesn't take an encoding argumentz+binary mode doesn't take an errors argumentz+binary mode doesn't take a newline argumentb__z can't be opened with mode )r   open	TypeErrortypejoinsortedgetattrAttributeError
ValueErrorr   __name__)
pathmode	bufferingencodingerrorsnewlinetextclsattrstreams
   &&&&&&    r   
magic_openrj      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                    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:   parentsstrr>   r?   )r0   r1   rE   s   && r   ensure_distinct_pathsrn      sL     fCD	>>	!fFGv;CLKCM
Ir   c                N    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:   rm   r>   r?   )r0   r1   source_file_idtarget_file_idrE   s   &&   r   ensure_different_filesrt      s    ----
	>#33 4 &?
@Cv;CLKCM
I $ 		   s"   ,B A5 5B
	B
B$#B$c                t   \        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)nsry   _xattrssetxattrN_posix_permissions
_bsd_flagschflags)hasattrr   utimesupports_follow_symlinksrv   rw   r|   r{   r   r5   EPERMr;   ENODATAr:   EACCESchmodr}   NotImplementedErrorr   r~   r7   )rp   r1   ry   copy_times_nst0t1copy_xattrsxattrsrh   valueecopy_posix_permissionsposix_permissionscopy_bsd_flags	bsd_flagswhys   &&&             r   	copy_infor      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                      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                &    \        V4      V n        R # N)rm   _path)selfr`   s   &&r   __init___PathInfoBase.__init__=  s    Y
r   c                @    \         P                  R 8X  d   RMRpRV R2# )ntWindowsPath	PosixPath<z.info>)r   r=   )r   	path_types   & r   __repr___PathInfoBase.__repr__@  s"    %'WW_M+	9+V$$r   ry   Tignore_errorsFc               V   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   statr   r   r^   _lstat_resultlstat)r   ry   r   results   &$$ r   _stat_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               L    \        V P                  VR7      P                  4      # )z"Return the POSIX file permissions.rx   )r   r   st_moder   ry   s   &$r   r}    _PathInfoBase._posix_permissionsf  s    tzz/zBJJKKr   c               V    V P                  VR7      pVP                  VP                  3# )z#Returns the identifier of the file.rx   )r   st_devst_inor   ry   sts   &$ r   rq   _PathInfoBase._file_idj  s%    ZZZ8yy"))##r   c               :    V P                  VR7      P                  # )z&Return the access time in nanoseconds.rx   )r   st_atime_nsr   s   &$r   rv   _PathInfoBase._access_time_nso      zz/z:FFFr   c               :    V P                  VR7      P                  # )z&Return the modify time in nanoseconds.rx   )r   st_mtime_nsr   s   &$r   rw   _PathInfoBase._mod_time_nss  r   r   st_flagsc               :    V P                  VR7      P                  # )zReturn the flags.rx   )r   r   r   s   &$r   r~   _PathInfoBase._bsd_flagsx  s    ::o:>GGGr   	listxattrc          
     @    \         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.rx   N)r   r   r   getxattrr   r5   r   r;   r   r:   r   )r   ry   rh   rE   s   &$  r   r{   _PathInfoBase._xattrs}  s     !#TZZ Y[ Y 2;;tzz4YZ Y[ [ [  99UGWff$MM	s.   $A -AA A B&,BBB)r   r   r   N)r   r   r   )r_   
__module____qualname____firstlineno__	__slots__r   r   r   r}   rq   rv   rw   r   r   stat_resultr~   r{   __static_attributes____classdictcell____classdict__s   @r   r   r   :  s     :I% &t  &5  &DLD L$$ $
G GGd G r~~z**	H 	H r;
	T 
	 
	  r   r   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.ry   Tc                  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`   existsr   _is_dir_is_filer   s   &$r   r   _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)r   r   r]   r   r`   isdirr   r   r   s   &$r   is_dir_WindowsPathInfo.is_dir  sd    4??#4#4	<< 	ww}}TZZ((.22t|$	   . 9B(B9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 regular file.FT)r   r   r]   r   r`   isfiler   r   r   s   &$r   is_file_WindowsPathInfo.is_file  sd    4??#4#4	==  	ww~~djj))/33 %	r   c                     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`   islinkr   r   s   &r   r   _WindowsPathInfo.is_symlink  sG    	$### 	$!ww~~djj9D###	$s    AAA)r   r   r   r   Nr_   r   r   r   __doc__r   r   r   r   r   r   r   r   s   @r   r   r     s>     JAI   $ $r   r   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
# )_PosixPathInfoi  z~Implementation of pathlib.types.PathInfo that provides status
information for POSIX paths. Don't try to construct it yourself.ry   Tc               8    V P                  VRR7      pVf   R# R# )r   Try   r   Fr   r   s   &$ r   r   _PosixPathInfo.exists  s    ZZtZL:r   c               ^    V P                  VRR7      pVf   R# \        VP                  4      # )r   Tr   F)r   r   r   r   s   &$ r   r   _PosixPathInfo.is_dir  +    ZZtZL:rzz""r   c               ^    V P                  VRR7      pVf   R# \        VP                  4      # )r   Tr   F)r   r   r   r   s   &$ r   r   _PosixPathInfo.is_file  r   r   c                ^    V P                  RRR7      pVf   R# \        VP                  4      # )r   FTr   )r   r   r   )r   r   s   & r   r   _PosixPathInfo.is_symlink  s+    ZZTZB:rzz""r   rO   Nr   r   s   @r   r   r     s>     HI # ## ## #r   r   r   c                   |   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                F   < \         SV `  VP                  4       Wn        R # r   )superr   r`   _entry)r   entry	__class__s   &&r   r   DirEntryInfo.__init__  s    $r   ry   Tr   Fc               r     V P                   P                  VR 7      #   \         d    T'       g   h  R# i ; i)rx   N)r   r   r   )r   ry   r   s   &$$r   r   DirEntryInfo._stat  s7    	;;##O#DD 	 	s    666c               >    V'       g   R# V P                  RR7      RJ# )r   T)r   Nr   r   s   &$r   r   DirEntryInfo.exists  s    zzz-T99r   c               `     V P                   P                  VR7      #   \         d     R# i ; i)r   rx   F)r   r   r   r   s   &$r   r   DirEntryInfo.is_dir  s1    	;;%%o%FF 		    --c               `     V P                   P                  VR7      #   \         d     R# i ; i)r   rx   F)r   r   r   r   s   &$r   r   DirEntryInfo.is_file  s1    	;;&&&GG 		r  c                \     V P                   P                  4       #   \         d     R# i ; i)r   F)r   r   r   r   s   &r   r   DirEntryInfo.is_symlink  s,    	;;))++ 		s    ++)r   )r_   r   r   r   r   r   r   r   r   r   r   r   r   r   __classcell__)r   r   s   @@r   r   r     sW      It 5 : :   r   r   )rNNN)T)"r   r5   ior   r   r   r   r   r   r   r   r   r   ImportErrorr!   r/   r   r   r   r   r)   r,   r2   rI   rj   rn   rt   r   r   r   r   r=   PathInfor   rO   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