+
    UBiQ:                       ^ RI Ht ^ RIHt ^ RIHt ^ RIHt ^ RI	t	^ RI
t
^ RIt^RIHtHtHt ^RIHt ^RIHtHtHtHt ^RIHtHtHtHt ^R	IHtHtHtH t H!t! ^R
I"H#t#H$t$H%t%H&t&H't'H(t( ]PR                  '       d=   ^RIH*t* ^RIH+t+ ^RI,H-t- ^RIH.t. ^RI"H/t/H0t0 ^ RI1H2t2  ! R R]24      t3 ! R R]24      t4 ! R R]4      t5R R lt6R# )    )annotations)sep)PathN)ExtensionModuleModuleReturnValue
ModuleInfo)mlog)BuildTargetCustomTargetCustomTargetIndexInvalidArguments)
INSTALL_KWINSTALL_MODE_KWINSTALL_TAG_KWNoneType)
FeatureNew	KwargInfotyped_kwargstyped_pos_argsnoKwargs)FileMesonExceptionhas_path_sep
is_windowspath_is_in_rootrelpath)ModuleState)BuildTargetTypes)Interpreter)TYPE_kwargs)FileOrStringFileMode)	TypedDictc                  &    ] tR t^t$ RtR]R&   RtR# )
ReadKwArgszKeyword Arguments for fs.read.strencoding N__name__
__module____qualname____firstlineno____doc____annotations____static_attributes__r(       :/usr/lib/python3.14/site-packages/mesonbuild/modules/fs.pyr%   r%      s
    ,r1   r%   c                  D    ] tR t^!t$ RtR]R&   R]R&   R]R&   R]R&   R	tR
# )CopyKwzKwargs for fs.copyboolinstallzT.Optional[str]install_dirr"   install_modeinstall_tagr(   Nr)   r(   r1   r2   r4   r4   !   s     $$$$r1   r4   c                  $  a  ] tR t^+t]! RR4      tR V 3R lltR R lt]R R l4       t	R	 R
 lt
]]! RR4      ]! R]4      R R l4       4       4       t]]! RR4      ]! R]]34      R R l4       4       4       t]]! RR4      ]! R]4      R R l4       4       4       t]]! R]4      R R l4       4       t]]! R]]34      R R l4       4       t]]! R]4      R R l4       4       t]]! R]4      R R  l4       4       t]]! R!]]3]4      R" R# l4       4       t]]! R$]]34      R% R& l4       4       t]]! R']]3]]34      R( R) l4       4       t]]! R*]]]]]3]4      R+ R, l4       4       t]]! R-]]]]]34      R. R/ l4       4       t]]! R0]]]]]34      R1 R2 l4       4       t]]! R3]]]]]34      ]! R3R4      R4 R5 l4       4       4       t ]]! R6]]]]]34      ]! R6R74      R8 R9 l4       4       4       t!]! R:R;4      ]! R:]]34      ]"! R:]#! R<]R=R>7      4      R? R@ l4       4       4       t$]! RARB4      ]! RA]]3].RC7      ]"! RA]%]&]']#! RD]](34      4      RE RF l4       4       4       t)]! RGRH4      ]! RG]]]]]3]]]]]34      ]RI RJ l4       4       4       t*RKt+V ;t,# )LFSModulefsz0.53.0c                    V ^8  d   QhRRRR/# )   interpreterr   returnNoner(   )formats   "r2   __annotate__FSModule.__annotate__/   s      K D r1   c                	2  < \         SV `  V4       V P                  P                  / R V P                  bRV P
                  bRV P                  bRV P                  bRV P                  bRV P                  bRV P                  bRV P                  bRV P                  bR	V P                  bR
V P                  bRV P                  bRV P                   bRV P"                  bRV P$                  bRV P&                  bRV P(                  bRV P*                  /C4       R# )as_posixcopyfileexists
expanduserhashis_absoluteis_diris_fileis_samepath
is_symlinknameparentreadrelative_toreplace_suffixsizestemsuffixN)super__init__methodsupdaterF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   )selfr?   	__class__s   &&r2   rY   FSModule.__init__/   sK   % 


 dkk
 $//	

 DII
 4++
 dkk
 t||
 4++
 $//
 DII
 dkk
 DII
 4++
 d11
  DII!
" DII#
$ dkk%
 	r1   c               $    V ^8  d   QhRRRRRR/# r>   stater   argr!   r@   r&   r(   )rB   s   "r2   rC   rD   F   s&     V V; V\ Vc Vr1   c                :   \        V\        4      '       d5   VP                  VP                  VP                  P                  4       4      # \        P                  P                  VP                  VP                  \        P                  P                  V4      4      # )zH
make an absolute path from a relative path, WITHOUT resolving symlinks
)
isinstancer   absolute_pathsource_rootenvironmentget_build_dirospathjoinsubdirrI   )r\   ra   rb   s   &&&r2   _absolute_dirFSModule._absolute_dirF   sj     c4  $$U%6%68I8I8W8W8YZZww||E--u||RWW=O=OPS=TUUr1   c               (    V ^8  d   QhRRRRRRRR/# )r>   feature_new_prefixr&   objz'T.Union[FileOrString, BuildTargetTypes]ra   r   r@   r(   )rB   s   "r2   rC   rD   O   s+     	6 	6C 	66] 	6fq 	6vy 	6r1   c                	z   \        V\        4      '       d   V# \        V\        4      '       d@   \        V  R 2R4      P	                  VP
                  VP                  R7       \        V4      # \        V  R2R4      P	                  VP
                  VP                  R7       VP                  P                  V4      # )z
 with file0.59.0locationz+ with build_tgt, custom_tgt, and custom_idxz1.4.0)	rd   r&   r   r   use
subprojectcurrent_nodebackendget_target_filename)rp   rq   ra   s   &&&r2   _obj_to_pathstrFSModule._obj_to_pathstrN   s    c3Jc4  ,-Z8(CGGHXHXchcucuGvs8O())TUW^_ccdidtdt  @E  @R  @Rc  	S}}0055r1   c               $    V ^8  d   QhRRRRRR/# r`   r(   )rB   s   "r2   rC   rD   Z   s!      + L S r1   c                    V P                  W4      p \        P                  P                  V4      pV#   \         d     T# i ; i)zk
resolves symlinks and makes absolute a directory relative to calling meson.build,
if not already absolute
)rm   ri   rj   realpath	Exception)r\   ra   rb   rj   s   &&& r2   _resolve_dirFSModule._resolve_dirZ   sM    
 !!%-	77##D)D   		s   4 AAzfs.expanduserz0.54.0c               (    V ^8  d   QhRRRRRRRR/# 	r>   ra   r   argsT.Tuple[str]kwargsT.Dict[str, T.Any]r@   r&   r(   )rB   s   "r2   rC   rD   k   s*     + + +< +I[ +`c +r1   c                	N    \         P                  P                  V^ ,          4      # r   )ri   rj   rI   r\   ra   r   r   s   &&&&r2   rI   FSModule.expanduserh   s     ww!!$q'**r1   zfs.is_absolutec               (    V ^8  d   QhRRRRRRRR/# 	r>   ra   r   r   T.Tuple[FileOrString]r   r   r@   r5   r(   )rB   s   "r2   rC   rD   q   s+     	) 	) 	)4I 	)Se 	)jn 	)r1   c                	   V^ ,          p\        V\        4      '       d=   \        RR4      P                  VP                  VP
                  R7       \        V4      p\        4       '       dc   VR,          P                  \        \        4      pVP                  \        ^,          4      ;'       g    VP                  R\        ,           ^4      # VP                  \        4      # )r   zfs.is_absolute with filers   rt   :N   N:)rd   r   r   rv   rw   rx   r&   r   replaceposixsepntsep
startswithr\   ra   r   r   rj   s   &&&& r2   rK   FSModule.is_absoluten   s     AwdD!!18<@@AQAQ\a\n\n@ot9D<<8##He4D??519-PPua1PPx((r1   zfs.as_posixc               (    V ^8  d   QhRRRRRRRR/# r   r(   )rB   s   "r2   rC   rD      s*     0 0k 0 0GY 0^a 0r1   c                D    V^ ,          P                  \        \        4      # )z
this function assumes you are passing a Windows path, even if on a Unix-like system
and so ALL '\' are turned to '/', even if you meant to escape a character
)r   r   r   r   s   &&&&r2   rF   FSModule.as_posix|   s     Awuh//r1   z	fs.existsc               (    V ^8  d   QhRRRRRRRR/# 	r>   ra   r   r   r   r   r   r@   r5   r(   )rB   s   "r2   rC   rD      s0     A AK A| AEW A\` Ar1   c                	l    \         P                  P                  V P                  W^ ,          4      4      # r   )ri   rj   rH   r   r   s   &&&&r2   rH   FSModule.exists   &     ww~~d//Aw?@@r1   zfs.is_symlinkc               (    V ^8  d   QhRRRRRRRR/# r   r(   )rB   s   "r2   rC   rD      s1     B B B3H BRd Bim Br1   c                	   \        V^ ,          \        4      '       d2   \        RR4      P                  VP                  VP
                  R7       \        P                  P                  V P                  W^ ,          4      4      # )r   zfs.is_symlink with filers   rt   )
rd   r   r   rv   rw   rx   ri   rj   islinkrm   r   s   &&&&r2   rO   FSModule.is_symlink   s_     d1gt$$0(;??@P@P[`[m[m?nww~~d00Q@AAr1   z
fs.is_filec               (    V ^8  d   QhRRRRRRRR/# r   r(   )rB   s   "r2   rC   rD      s0     A A[ A AFX A]a Ar1   c                	l    \         P                  P                  V P                  W^ ,          4      4      # r   )ri   rj   isfiler   r   s   &&&&r2   rM   FSModule.is_file   r   r1   z	fs.is_dirc               (    V ^8  d   QhRRRRRRRR/# r   r(   )rB   s   "r2   rC   rD      s0     @ @K @| @EW @\` @r1   c                	l    \         P                  P                  V P                  W^ ,          4      4      # r   )ri   rj   isdirr   r   s   &&&&r2   rL   FSModule.is_dir   s&     ww}}T..u1g>??r1   zfs.hashc               (    V ^8  d   QhRRRRRRRR/# )	r>   ra   r   r   zT.Tuple[FileOrString, str]r   r   r@   r&   r(   )rB   s   "r2   rC   rD      s+      + -G Qc hk r1   c           	     	H   \        V^ ,          \        4      '       d2   \        RR4      P                  VP                  VP
                  R7       V P                  W^ ,          4      p\        P                  P                  V4      '       g   \        V R24      h \        P                  ! V^,          4      p\        P                   ! RP                  T^,          T\        P"                  ! T4      P$                  4      4       \'        TR^ R7      ;_uu_ 4       pTP)                  TP+                  4       4       R	R	R	4       TP-                  4       #   \         d#    \        RP                  T^,          4      4      hi ; i  + '       g   i     TP-                  4       # ; i)
r   zfs.hash with filers   rt   z- is not a file and therefore cannot be hashedz"hash algorithm {} is not availablez$computing {} sum of {} size {} bytesrb)mode	bufferingN)rd   r   r   rv   rw   rx   r   ri   rj   r   r   hashlibnew
ValueErrorrB   r	   debugstatst_sizeopenr[   rR   	hexdigest)r\   ra   r   r   filehfs   &&&&   r2   rJ   FSModule.hash   s<    d1gt$$*H599%:J:JUZUgUg9h  Q0ww~~d## D6)V!WXX	WDG$A 	

9@@a$PRPWPWX\P]PePefg$TQ//1HHQVVX 0{{}  	W !E!L!LTRSW!UVV	W 0/{{}s   E  F-E?F!	zfs.sizec               (    V ^8  d   QhRRRRRRRR/# )	r>   ra   r   r   r   r   r   r@   intr(   )rB   s   "r2   rC   rD      s1     	T 	T+ 	T-B 	TL^ 	Tcf 	Tr1   c                	   \        V^ ,          \        4      '       d2   \        RR4      P                  VP                  VP
                  R7       V P                  W^ ,          4      p\        P                  P                  V4      '       g   \        V R24      h \        P                  ! V4      P                  #   \         d#    \        RP                  T^ ,          4      4      hi ; i)r   zfs.size with filers   rt   z, is not a file and therefore cannot be sizedz{} size could not be determined)rd   r   r   rv   rw   rx   r   ri   rj   r   r   r   r   r   rB   )r\   ra   r   r   r   s   &&&& r2   rU   FSModule.size   s     d1gt$$*H599%:J:JUZUgUg9h  Q0ww~~d## D6)U!VWW	T774=((( 	T !B!I!I$q'!RSS	Ts   B; ;-C(zfs.is_samepathc               (    V ^8  d   QhRRRRRRRR/# )	r>   ra   r   r   z#T.Tuple[FileOrString, FileOrString]r   r   r@   r5   r(   )rB   s   "r2   rC   rD      s+       4W as x| r1   c                	8   \        V^ ,          \        4      '       g   \        V^,          \        4      '       d2   \        RR4      P                  VP                  VP
                  R7       V P                  W^ ,          4      pV P                  W^,          4      p\        P                  P                  V4      '       g   R# \        P                  P                  V4      '       g   R#  \        P                  P                  WE4      #   \         d     R# i ; i)r   zfs.is_samepath with filers   rt   F)rd   r   r   rv   rw   rx   r   ri   rj   rH   samefileOSError)r\   ra   r   r   file1file2s   &&&&  r2   rN   FSModule.is_samepath   s     d1gt$$
47D(A(A18<@@AQAQ\a\n\n@o!!%a1!!%a1ww~~e$$ww~~e$$	77##E11 		s   +D
 
DDfs.replace_suffixc               (    V ^8  d   QhRRRRRRRR/# )	r>   ra   r   r   z5T.Tuple[T.Union[FileOrString, BuildTargetTypes], str]r   r   r@   r&   r(   )rB   s   "r2   rC   rD      s3     3 3K 37l 3  wI 3  NQ 3r1   c                	$   V^,          '       d5   V^,          P                  R4      '       g   \        RV^,          : 24      hV P                  RV^ ,          V4      p\        P                  P                  V4      ^ ,          V^,          ,           # )   .zInvalid suffix r   )r   r   r{   ri   rj   splitextr   s   &&&& r2   rT   FSModule.replace_suffix   ss     7747--c22tAwk:;;##$7a%Hww%a(4722r1   	fs.parentc               (    V ^8  d   QhRRRRRRRR/# 	r>   ra   r   r   z0T.Tuple[T.Union[FileOrString, BuildTargetTypes]]r   r   r@   r&   r(   )rB   s   "r2   rC   rD      s/     - -K -/_ -i{ -  AD -r1   c                	    V P                  R V^ ,          V4      p\        P                  P                  V4      ^ ,          ;'       g    R# )r   r   )r{   ri   rj   splitr   s   &&&& r2   rQ   FSModule.parent   s<     ##Ka%@ww}}T"1%,,,r1   fs.namec               (    V ^8  d   QhRRRRRRRR/# r   r(   )rB   s   "r2   rC   rD      s/     & &+ &-] &gy &  B &r1   c                	t    V P                  R V^ ,          V4      p\        P                  P                  V4      # r   )r{   ri   rj   basenamer   s   &&&& r2   rP   FSModule.name   s1     ##ItAw>ww%%r1   zfs.stemc               (    V ^8  d   QhRRRRRRRR/# r   r(   )rB   s   "r2   rC   rD      s/     ; ;+ ;-] ;gy ;  B ;r1   c                	    V P                  R V^ ,          V4      p\        P                  P                  \        P                  P	                  V4      4      ^ ,          # r   )r{   ri   rj   r   r   r   s   &&&& r2   rV   FSModule.stem   sE     ##ItAw>ww 0 0 67::r1   	fs.suffixz1.9.0c               (    V ^8  d   QhRRRRRRRR/# r   r(   )rB   s   "r2   rC   rD      s/     ) )K )/_ )i{ )  AD )r1   c                	    V P                  R V^ ,          V4      p\        P                  P                  V4      ^,          # )r   )r{   ri   rj   r   r   s   &&&& r2   rW   FSModule.suffix   s6     ##Ka%@ww%a((r1   zfs.readz0.57.0r'   zutf-8)defaultc               (    V ^8  d   QhRRRRRRRR/# )	r>   ra   r   r   r   r   r%   r@   r&   r(   )rB   s   "r2   rC   rD      s*     ' '+ '-B 'J '[^ 'r1   c                   V^ ,          pVR,          pVP                   P                  pVP                  pVP                   P                  4       p\	        V\
        4      '       dL   VP                  '       d   \        R4      h\        P                  P                  WdP                  4       4      pMFV'       d    \        P                  P                  Wg4      p\        P                  P                  Wd4      p\        P                  P                  V4      p\        \        V4      \        V4      RR7      '       d   \        R4      h \        WER7      ;_uu_ 4       p	V	P!                  4       p
RRR4       T P&                  P)                  T4       X
#   + '       g   i     L-; i  \"         d    \        RT^ ,           R	24      h\$         d    \        R
T^ ,           24      hi ; i)a  Read a file from the source tree and return its value as a decoded
string.

If the encoding is not specified, the file is assumed to be utf-8
encoded. Paths must be relative by default (to prevent accidents) and
are forbidden to be read from the build directory (to prevent build
loops)
r'   z-fs.read does not accept built files() objectsT)resolvez"path must not be in the build tree)r'   NzFile z does not exist.zdecoding failed for )rg   
source_dirrl   rh   rd   r   is_builtr   ri   rj   rk   relative_nameabspathr   r   r   rR   FileNotFoundErrorUnicodeDecodeErrorr?   add_build_def_file)r\   ra   r   r   rj   r'   src_dirsub_dir	build_dirr   datas   &&&&       r2   rR   FSModule.read   st    Aw*%##..,,%%335	dD!!}}}$CE E77<<););)=>D'',,w877<<.Dwwt$4:tIEE !EFF	Cd..!vvx / 	++D1 /.  	D 5a	1A!BCC! 	C #7Qy!ABB	Cs0   F$ F,F$ F!	F$ !F$ $)G%G%zfs.copyfilez0.64.0)optargsr7   c               (    V ^8  d   QhRRRRRRRR/# )	r>   ra   r   r   z&T.Tuple[FileOrString, T.Optional[str]]r   r4   r@   r   r(   )rB   s   "r2   rC   rD   !  s+     + +k +1W ++$5+r1   c                ~   VR,          '       d   VR,          '       g   \        R4      hV P                  P                  V^ ,          .4      ^ ,          pV^,          '       d
   V^,          M(\        P                  P                  VP                  4      p\        V4      '       d   \        R4      h\        VVP                  VP                  VP                  VP                  P                  4       . R
O,           V.V.RVR,          VR,          .VR,          VR,          .VP                  RR	7      p\        Wf.4      # )z3Copy a file into the build directory at build time.r6   r7   z6"install_dir" must be specified when "install" is truez-Destination path may not have path separatorsTr8   r9   zCopying file {})build_by_defaultr6   r7   r8   r9   ry   description)z
--internalcopyz@INPUT@z@OUTPUT@)r   r?   source_strings_to_filesri   rj   r   fnamer   r   rl   rw   rg   get_build_commandry   r   )r\   ra   r   r   srcdestcts   &&&&   r2   rG   FSModule.copyfile  s    )VM%:%:"#[\\66QyA!D q''tAwrww'7'7		'B"#RSSLL//14aaEF!9%.//./MM)
" !T**r1   zfs.relative_toz1.3.0c               (    V ^8  d   QhRRRRRRRR/# )	r>   ra   r   r   zYT.Tuple[T.Union[FileOrString, BuildTargetTypes], T.Union[FileOrString, BuildTargetTypes]]r   r    r@   r&   r(   )rB   s   "r2   rC   rD   E  s6         5N   Xc   hk r1   c                	h   a R  V3R llpV! V^ ,          4      pV! V^,          4      p\        WV4      # )c                    V ^8  d   QhRRRR/# )r>   rb   zCT.Union[FileOrString, CustomTarget, CustomTargetIndex, BuildTarget]r@   r&   r(   )rB   s   "r2   rC   *FSModule.relative_to.<locals>.__annotate__F  s      	U 	U\ 	Uad 	Ur1   c                  < \        V \        4      '       d;   V P                  SP                  P                  SP                  P
                  4      # \        V \        \        \        34      '       d   SP                  P                  V 4      # \        P                  P                  SP                  P                  SP                  V 4      # N)rd   r   re   rg   r   r   r   r   r
   ry   get_target_filename_absri   rj   rk   rl   )rb   ra   s   &r2   to_path%FSModule.relative_to.<locals>.to_pathF  s    #t$$(():):)E)EuGXGXGbGbccC,0A;!OPP}}<<SAAww||E$5$5$@$@%,,PSTTr1   )r   )r\   ra   r   r   r  tr   s   &f&&   r2   rS   FSModule.relative_toB  s7    	U 	U DGDGq}r1   r(   )-r*   r+   r,   r-   r   INFOrY   rm   staticmethodr{   r   r   r   r   r&   rI   r   rK   rF   rH   rO   rM   rL   rJ   rU   rN   r   r   r
   rT   rQ   rP   rV   rW   r   r   rR   r   r   r   r   rG   rS   r0   __classcell__)r]   s   @r2   r;   r;   +   s   dH%D .V 	6 	6 *OS)+ * + +  (+$sDk2	) 3 , 	) x(M3'0 ( ) 0 K%A & A Oc4[1B 2 B
 L#&A ' A K%@ & @ IT{C0 1  IT{+	T , 	T $sDkC;? @  '#t\CTVa)bdgh3 i 3 K#t\;Lk!Z[- \ - IT<9JKXY& Z & IT<9JKXY	8$; % Z ; K#t\;Lk!Z[W%) & \ ) 	8$IT{+)Yz3HI' J , %'R x(MD#;>-#x1+ ? )+B  '*$sD,@QS^&_begkmy  |M  OZ  b[  \  \ +r1   r;   c               $    V ^8  d   QhRRRRRR/# )r>   r   zT.Anyr   r@   r;   r(   )rB   s   "r2   rC   rC   T  s!     % %e %u % %r1   c                     \        V / VB # r  )r;   )r   r   s   *,r2   
initializer  T  s    T$V$$r1   )7
__future__r   ntpathr   r   pathlibr   	posixpathr   r   ri   typingT r   r   r   r	   buildr
   r   r   r   interpreter.type_checkingr   r   r   r   interpreterbaser   r   r   r   r   mesonlibr   r   r   r   r   r   TYPE_CHECKINGr   r   r?   r   r    r!   r"   typing_extensionsr#   r%   r4   r;   r  r(   r1   r2   <module>r     s    #   %  	  < <  R R ] ] [ [ _ _???()-1+Y 
% %f fR	%r1   