Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
shutil.cpython-314.pyc497 linesDownload Raw Back to __pycache__
1+
2��i����	�Rt^RIt^RIt^RIt^RIt^RIt^RIt^RItARt^RI3t4A5Rt^RItARt
^RIHtARt]P"R8HtR;tt]P"R8Xd^RItM]'d^RIt]P*R8Xd^RItMRt]'dRqMRrt]!]R4;'d]P*P3Rs4s]!]R	4t];'d6]!]R74tRt.RtOt!RR]4t !RR] 4t!!RR
]4t"!RR]4t#!RR]$4t%!RR]$4t&Rt'Rt(Rt)Rt*]3Rlt+RuRlt,Rt-Rt.R t/R!R/R"lt0R!R/R#lt1]!]R$4'd	R!R/R%lt2MR&t2R!R/R'lt3R!R/R(lt4R!R/R)lt5R*t6RvR+lt7RR]5RR3R,lt8]!]PrR-4'dR.t:MR/t:R0t;R1t<R2t=]P|]P]P~]P�0]P�8*;'d;]P�]P�9;'d]P]P�9tE]E'd]<M];tFRwR3RR4R/R5lltG]E]GnHR6tI]53R7ltJR8tKR9tLR:tMR;tNRxR<ltORyR=ltPR]OnQR]PnQR>]ORz.R?3/tR]'d]OR{.R@3]RRA&]P.RB3]RRC&]'d8]OR|.RD3]RRE&]
'd9]OR}.RF3]RRG&]'d10]OR~.RH3]RRI&RJtSRRKltTRLtUR�RMltVRNtWROtXRRPltYRQtZRRt[RSt\RTR/RUlt]R>RV.]].R?3RCRW.]\.RB3/t^]'dRXRY.]].R@3]^RA&]'dRZR[.]].RD3]^RE&]
'dR\R].]].RF3]^RG&]'dR^R_.]].RH3]^RI&R`t_R�RTR/Rallt`]!]Rb4'd\]P�Rc4]P�!RdRe4tcRf]cP�nRg]cP�nRh]cP�nRitgM/]'d(]P�Rc4]P�!RdRe4tcRjtgR�R4RR!R/RkllthR�RlltiRmtjRntk]P�]P�,R3RoltnRptoR# ]	dRtEL,i;i ]	dRtEL4i;i ]	dRt
EL<i;i ]	dRtELBi;i)�z�Utility functions for copying and archiving files and directory trees.11 12XXX The functions here don't copy the resource fork or other metadata on Mac.13 14NTF)�zstd�nt�posix�win32�sendfile�copy_file_range�15_fcopyfilez%.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS;.MSC�Error�SpecialFileError�
SameFileErrorc��]tRt^KtRtR#)r	�N)�__name__�16__module__�__qualname__�__firstlineno__�__static_attributes__r
��
Lib\shutil.pyr	r	Ks��rc��]tRt^NtRtRtR#)rz5Raised when source and destination are the same file.r
N�rrrr�__doc__rr
rrrrNs��?rc��]tRt^QtRtRtR#)r17zxRaised when trying to do a kind of operation (e.g. copying) which is18not supported on a special file (e.g. a named pipe)r
Nrr
rrr19r20Qs��;rc��]tRt^VtRtRtR#)�	ReadErrorz%Raised when an archive cannot be readr
Nrr
rrrrVs��/rrc��]tRt^YtRtRtR#)�
RegistryErrorzRRaised when a registry operation with the archiving21and unpacking registries failsr
Nrr
rrrrYs��&rrc��]tRt^]tRtRtR#)�_GiveupOnFastCopyzmRaised as a signal to fallback on using raw read()/write()22file copy when fast-copy functions fail to do so.23r
Nrr
rrrr]s��rrc��VP4pVP4p\P!Y4T4R# \dp\T4hRp?ii;i \24depTPTnTPTnTP\P\P09d\T4hTRhRp?ii;i)z`Copy a regular file content or metadata by using high-performance25fcopyfile(3) syscall (macOS).26N)�fileno�	Exceptionrrr�OSError�name�filename�	filename2�errno�EINVAL�ENOTSUP)�fsrc�fdst�flags�infd�outfd�errs&&&   r�_fastcopy_fcopyfiler/bs���%��{�{�}�����
�� �
����e�,��	�%���$�$��%��27� ��y�y����	�	��
��9�9����u�}�}�5�5�#�C�(�(��4���
 �s-� <�A�A�A�A�C	�%AC�C	c���\\P!V4PR4p\28PR8d
\VR4pV# \dRpL2i;i)aODetermine blocksize for fastcopying on Linux.29 30Hopefully the whole file will be copied in a single call.31The copying itself should be performed in a loop 'till EOF is32reached (0 return) so a blocksize smaller or bigger than the actual33file size should not make any difference, also in case the file34content changes while being copied.35i�ili@)�max�os�fstat�st_sizer"�sys�maxsize�min)r,�	blocksizes& r�#_determine_linux_fastcopy_blocksizer9vsW���������.�.��8�	�36�{�{�W���	�7�+�	����
���	��s�*A�
A�Ac�B�VP4pVP4p\T4p^p\P37!Y#YVR7pT^8XdT^8Xd\4hR#Yg,
pK> \dp\T4hRp?ii;i \d�pTPTnTPTn	TP\P8XdTRhT^8Xd7\P!T^\P4^8Xd\T4hThRp?ii;i)z�Copy data from one regular mmap-like fd to another by using38a high-performance copy_file_range(2) syscall that gives filesystems39an opportunity to implement the use of reflinks or server-side copy.40 41This should work on Linux >= 4.5 only.42N)�43offset_dst)r r!rr9r2rr"r#r$r%r&�ENOSPC�lseek�SEEK_CUR)r)r*r,r-r.r8�offset�n_copieds&&      r�_fastcopy_copy_file_rangerA�s���%��{�{�}�����
��4�D�9�I�
�F�44�	��)�)�$�y�T�H��1�}��Q�;�+�-�-����F��;�%���$�$��%���	��9�9�C�L� �I�I�C�M��y�y�E�L�L�(��t�#���{�r�x�x��q�"�+�+�>�!�C�'��,�,��I��	�s/� A-�B�-B�8B�B�D�BD�Dc�v�VP4pVP4p\T4p^p\P45!Y2Ye4pT^8XdR#Yg,
pK, \dp\T4hRp?ii;i \d�pTPTnTPTn	TP\P8XdRs\T4hTP\P8XdTRhT^8Xd7\P!T^\P4^8Xd\T4hThRp?ii;i)z�Copy data from one regular mmap-like fd to another by using46high-performance sendfile(2) syscall.47This should work on Linux >= 2.6.33, Android and Solaris.48NF)r r!rr9r2rr"r#r$r%r&�ENOTSOCK�_USE_CP_SENDFILEr<r=r>)r)r*r,r-r.r8r?�sents&&      r�_fastcopy_sendfilerF�s	��%��{�{�}�����
��4�D�9�I�
�F�49�	��;�;�u�F�>�D�,�q�y���N�F��?�%���$�$��%���	��9�9�C�L� �I�I�C�M��y�y�E�N�N�*�$)� �'��,�,��y�y�E�L�L�(��t�#���{�r�x�x��q�"�+�+�>�!�C�'��,�,��I��'	�s/� A�A9�A6�&A1�1A6�9D8�B/D3�3D8c	�P�VPpVPp\\V44;_uu_4pV!V4pV'gM/Wb8d VRV;_uu_4pV!V4RRR4M50V!V4KARRR4R# +'giL%;i +'giR#;i)z�readinto()/memoryview() based variant of copyfileobj().51*fsrc* must support readinto() method and both files must be52open in binary mode.53N)�readinto�write�54memoryview�	bytearray)r)r*�length�
fsrc_readinto�55fdst_write�mv�n�smvs&&&     r�_copyfileobj_readintorR�s���M�M�M����J�	�I�f�%�	&�	&�"���b�!�A��������V�V�s��s�O����2��56'�	&��V��
57'�	&�	&�s)�B�B�	B	�$B�B
�B�B%	c��V'g\pVPpVPpV!V4;p'dV!V4KR#)z=copy data from file-like object fsrc to file-like object fdstN)�COPY_BUFSIZE�readrI)r)r*rL�	fsrc_readrN�bufs&&&   r�copyfileobjrX�s8������	�	�I����J��6�"�58"�#�59"��3��#rc���\V\P4'dd\\PR4'dD\PPVP
4\P!V44#\\PR4'd!\PPW4#\PP\PPV44\PP\PPV448H# \dR#i;i \dR#i;i)�samestatF�samefile)�60isinstancer2�DirEntry�hasattr�pathrZ�statr"r[�normcase�abspath��src�dsts&&r�	_samefilerfs����#�r�{�{�#�#������(D�(D�	��7�7�#�#�C�H�H�J������=�=��r�w�w�61�#�#�	��7�7�#�#�C�-�-�62
�G�G���R�W�W�_�_�S�1�2��G�G���R�W�W�_�_�S�1�2�
3�4���	��	���	��	�s%�AD=�%E�=E�E�E�Ec��\V\P4'dVP4#\P!V4#�N)r\r2r]r`��fns&r�_statrks+��"�2�r�{�{�3�3�2�7�7�9�D������Drc��\V\P4'dVP4#\PPV4#rh)r\r2r]�63is_symlinkr_�islinkris&r�_islinkros0��(��R�[�[�9�9�2�=�=�?�Q�r�w�w�~�~�b�?Q�Qr�follow_symlinksc�N�\P!RW4\W4'd\RP	W44h^p\W.4F�wrE\
V4p\P!VP4'dA\V\P4'd
VPMTp\RV,4h\'dV^8XdVP pK�K�K�	V'g?\%V4'd.\P&!\P(!V4V4V#\+VR4;_uu_4p\+VR4;_uu_4p\,'d2\/Wx\0P24VuuRRR4uuRRR4#\6'g
\8'd^\8'd#\;Wx4VuuRRR4uuRRR4#\6'd#\=Wx4VuuRRR4uuRRR4#MC\'d8V^8�d1\?Wx\AV\B44VuuRRR4uuRRR4#\EWx4RRR4RRR4T# \"dEK0i;i \4dL=i;i \4dL�i;i \4dL_i;i +'giL`;i \Fd;p	\PPIT4'g\KRT24T	hhRp	?	ii;i +'giT#;i)z�Copy data from src to dst in the most efficient way possible.64 65If follow_symlinks is not set and src is a symbolic link, a new66symlink will be created instead of copying the file it points to.67 68zshutil.copyfilez{!r} and {!r} are the same filez`%s` is a named pipe�rb�wbNzDirectory does not exist: )&r5�auditrfr�format�	enumeraterkr`�S_ISFIFO�st_moder\r2r]r_r69�_WINDOWSr4r"ro�symlink�readlink�open�_HAS_FCOPYFILEr/r�_COPYFILE_DATArrD�_USE_CP_COPY_FILE_RANGErArFrRr7rTrX�IsADirectoryError�exists�FileNotFoundError)70rdrerp�	file_size�irj�str)r*�es71&&$       r�copyfiler�s}���I�I���*������=�D�D�S�N�O�O��I��C�:�&���	'��r��B��}�}�R�Z�Z�(�(� *�2�r�{�{� ;� ;�R�W�W���&�'=��'B�C�C��x�A��F��J�J�	�#�x�'��w�s�|�|�72�73�74�2�;�;�s�#�S�)�T�J�Q�#�t�_�_��%
��#�t�_�_��%�~�!�/��E�<P�<P�Q�#&�%�_��_�*�)�-D�-D�2�2�%� 9�$� E�'*�%�_��_�&,�+�%� 2�4� >�'*�)%�_��_�&,�"��i�!�m�-�d�#�i��:V�W�"�7%�_��_�> ��+�;%��P�J��m�	��	��, 1�!� �!��$5�%� $�%��$5�%� $�%��+%�_��@%�
��w�w�~�~�c�*�*�+�.H���,N�O�UV�V���	
��E�_�P�J�s��I2�	L�K�
J8	�-J�75K�J8	�)J8	�5J8	�J�76K�#J8	�0J'�<77K�J8	�"J8	�78K�J8	� K�2J�J�J�J8	�J�J8	�J$�!J8	�#J$�$J8	�'J5�2J8	�4J5�5J8	�8K
�K�L�K�L�5L�L�L�L$	c�&�\P!RW4V'go\V4'd^\PPV4'd9\
\R4'd!\P\PrCMVR#\p\PR8Xd*\PPV4'dRpM\PpV!V4pV!V\P!VP44R#)z�Copy mode bits from src to dst.79 80If follow_symlinks is not set, symlinks aren't followed if and only81if both `src` and `dst` are symlinks.  If `lchmod` isn't available82(e.g. Linux) this method does nothing.83 84zshutil.copymode�lchmodNrc�2�\P!VRR/R#)rpTN)r2�chmod��argss*r�85chmod_func�copymode.<locals>.chmod_funcus�����$�5��5r)r5rtror2r_rnr^�lstatr�rkr#r�r`�S_IMODErx)rdrerp�	stat_funcr�r�s&&$   r�copymoder�cs����I�I���*��w�s�|�|������s�0C�0C��2�x� � �$&�H�H�b�i�i�z���	�
�7�7�d�?�r�w�w�~�~�c�2�2�
6����J�	�3��B��s�D�L�L����,�-r�	listxattrc�H�\P!WR7pTF4p\P!YTR7p\P!YYbR7K6	R# \dKpTP\P\P86\P39dhRp?R#Rp?ii;i \djpTP\P\P\P87\P\P39dhRp?EKRp?ii;i)z�Copy extended filesystem attributes from `src` to `dst`.88 89Overwrite existing attributes.90 91If `follow_symlinks` is false, symlinks won't be followed.92 93�rpN)r2r�r"r&r(�ENODATAr'�getxattr�setxattr�EPERM�EACCES)rdrerp�namesr�r#�values&&$    r�94_copyxattrr�~s���	��L�L��F�E�95�D�
����C��O�����C�u�N���	�	��w�w�u�}�}�e�m�m�U�\�\�J�J����	���
��7�7�5�;�;��
�
�u�}�}�#(�<�<����#?�?��?��
�s/�A�0B-�B*� ?B%�%B*�-D!�8AD�D!c��R#rhr
)r��kwargss*,rr�r�����rc�va	�\P!RW4RRRR/Rlo	T;'g8\V4;'d \PPV4'*pV'dV	3RlpMV	3Rlp\
V\P4'dVPVR7pMV!R	4!WR7p\P!VP4pV!R964!WPVP3VR7\WVR7V!R4!WVR7\VR
4'dV!R4!WP VR7R#R# \dL>i;i \"dNpRFAp\\$T4'gKTP$\'\$T48XgK<Rp?R#	hRp?ii;i)a�Copy file metadata97 98Copy the permission bits, last access time, last modification time, and99flags from `src` to `dst`. On Linux, copystat() also copies the "extended100attributes" where possible. The file contents, owner, and group are101unaffected. `src` and `dst` are path-like objects or path names given as102strings.103 104If the optional flag `follow_symlinks` is not set, symlinks aren't105followed if and only if both `src` and `dst` are symlinks.106zshutil.copystat�nsNrpc��R#rhr
)r�rpr�s$$*r�_nop�copystat.<locals>._nop�r�rc�&<�\\VS4#rh)�getattrr2)r#r�s&�r�lookup�copystat.<locals>.lookup�s����2�t�T�*�*rc�X<�\\VS4pV\P9dV#S#rh)r�r2�supports_follow_symlinks)r#rjr�s& �rr�r��s)�����T�4�(�B��R�0�0�0��	��Krr�r`�utime)r�rpr��st_flags�chflags)�107EOPNOTSUPPr()r5rtror2r_rnr\r]r`r�rx�st_atime_ns�st_mtime_nsr��NotImplementedErrorr^r�r"r&r�)108rdrerp�followr�r��mode�whyr.r�s109&&$      @r�copystatr��sc����I�I���*�
�t�
�T�
��
J�
J�W�S�\�%I�%I�b�g�g�n�n�S�6I� J�F�
�	+�110	��#�r�{�{�#�#�
�X�X�f�X�
-��
�F�^�C�
8���<�<��111�112�#�D�113�7�O�C�^�^�R�^�^�<�� ��s��0�

��w���6�:��r�:���	��9��c�;�;��G����
�	
�
���	�.���5�#�&�&�3�9�9���s�8K�+K��/���	�s<�E�1E �E�E� F8�+F3�F3�)F3�0F3�3F8c���\PPV4'd>\PPV\PP	V44p\WVR7\
WVR7V#)aCopy data and mode bits ("cp src dst"). Return the file's destination.114 115The destination may be a directory.116 117If follow_symlinks is false, symlinks won't be followed. This118resembles GNU's "cp -P src dst".119 120If source and destination are the same file, a SameFileError will be121raised.122 123r�)r2r_�isdir�join�basenamer�r�)rdrerps&&$r�copyr��sS��124�w�w�}�}�S����g�g�l�l�3���� 0� 0�� 5�6���S��7��S��7��Jrc���\PPV4'd>\PPV\PP	V44p\\R4'dv\P!V4p\P!V4p\PpV'gV\P,p\P!W4V4V#\WVR7\!WVR7V# \dWpTP\P8XdT'gRp?LSTP\P8XdRp?LwhRp?ii;i)aCopy data and metadata. Return the file's destination.125 126Metadata is copied with copystat(). Please see the copystat function127for more information.128 129The destination may be a directory.130 131If follow_symlinks is false, symlinks won't be followed. This132resembles GNU's "cp -P src dst".133�	CopyFile2Nr�)r2r_r�r�r�r^�_winapi�fsdecode�%COPY_FILE_ALLOW_DECRYPTED_DESTINATION�COPY_FILE_COPY_SYMLINKr�r"�winerror�ERROR_PRIVILEGE_NOT_HELD�ERROR_ACCESS_DENIEDr�r�)rdrerp�src_�dst_r+�excs&&$    r�copy2r��s���134�w�w�}�}�S����g�g�l�l�3���� 0� 0�� 5�6���w��$�$��{�{�3����{�{�3����=�=����W�3�3�3�E�	����d�%�0��J�
�S��7��S��7��J���	����� @� @�@�'������!<�!<�<����	�s$�D135�136E+�&E&�E&�%E&�&E+c�a�V3RlpV#)z�Function that can be used as copytree() ignore parameter.137 138Patterns is a sequence of glob-style patterns139that are used to exclude filesc�z<�.pSF(pVP\P!W44K*	\V4#rh)�extend�fnmatch�filter�set)r_r��
ignored_names�pattern�patternss&&  �r�_ignore_patterns�)ignore_patterns.<locals>._ignore_patternss4����
��G�� � �����!?�@� ��=�!�!rr
)r�r�sj r�ignore_patternsr�s���140"�141�rc142�143�Ve8T!\P!V4VUu.uFq�PNK	up4p	MRp	\P!W'R7.p144V\J;'g	V\145JpVEF�pVPV	9dK\PPWP4p
\PPW,P4pV'dTMT
pVP4pV'dI\PR8Xd4VPRR7pVP\P8XdRpV'd�\P!V
4pV'd-\P!VV4\W�V'*R7EK(\PPV4'gV'dEKXVP!4'd\#W�W4WVV4EKV!W�4EK�VP!4'd\#W�W4VWg4EK�V!W�4EK�	\W4V146'd\%V1474hV#uupi \$d/pT148P'TP(^,4Rp?EKRp?i\*d)pT149P-Y�\/T434Rp?EKIRp?ii;i \*d6p\1TRR4fT150P-Y\/T434Rp?L�Rp?ii;i)N)�exist_okrFr�r�r
)r2�fspathr#�makedirsr�r�r_r�rmr`�st_reparse_tag�IO_REPARSE_TAG_MOUNT_POINTr{rzr�r��is_dir�copytreer	r�r�r"�append�strr�)�entriesrdre�symlinks�ignore�
copy_function�ignore_dangling_symlinks�
dirs_exist_ok�xr��errors�use_srcentry�srcentry�srcname�dstname�srcobjrmr��linktor.r�s&&&&&&&&             r�	_copytreer�!s>��
���r�y�y��~��/H��1����/H�I�
��
��K�K��,�
�F� �E�)�B�B�]�d�-B�L����=�=�M�)���'�'�,�,�s�M�M�2���'�'�,�,�s�M�M�2��)��w��&	8�!�,�,�.�J��b�g�g��o�!�
�
�e�
�<���'�'�4�+J�+J�J�!&�J�����W�-����J�J�v�w�/��V�(�l�K�K��7�7�>�>�&�1�1�6N� ����(�(� ��(�!.�!.�0�&�f�6����"�"���(�M�1�B��f�.�M�Z0����151��F�m���J��{0I��b�	'��M�M�#�(�(�1�+�&�&���	8��M�M�7�S��X�6�7�7��	8���0��3�152�D�)�1��M�M�3�S��X�.�/���0�s��I153�'I�?AI�I�-)I�$I�>I�	I�I�0I�;I�I�"I�0K�J?� "J	�	J?�J?�J:�:J?�L�
+K=�=Lc���\P!RW4\P!V4;_uu_4p\	V4pRRR4\XWVW4VVR7# +'giL!;i)a�Recursively copy a directory tree and return the destination directory.154 155If exception(s) occur, an Error is raised with a list of reasons.156 157If the optional symlinks flag is true, symbolic links in the158source tree result in symbolic links in the destination tree; if159it is false, the contents of the files pointed to by symbolic160links are copied. If the file pointed to by the symlink doesn't161exist, an exception will be added in the list of errors raised in162an Error exception at the end of the copy process.163 164You can set the optional ignore_dangling_symlinks flag to true if you165want to silence this exception. Notice that this has no effect on166platforms that don't support os.symlink.167 168The optional ignore argument is a callable. If given, it169is called with the `src` parameter, which is the directory170being visited by copytree(), and `names` which is the list of171`src` contents, as returned by os.listdir():172 173    callable(src, names) -> ignored_names174 175Since copytree() is called recursively, the callable will be176called once for each directory that is copied. It returns a177list of names relative to the `src` directory that should178not be copied.179 180The optional copy_function argument is a callable that will be used181to copy each file. It will be called with the source path and the182destination path as arguments. By default, copy2() is used, but any183function that supports the same signature (like copy()) can be used.184 185If dirs_exist_ok is false (the default) and `dst` already exists, a186`FileExistsError` is raised. If `dirs_exist_ok` is true, the copying187operation will continue if it encounters existing directories, and files188within the `dst` tree will be overwritten by corresponding files from the189`src` tree.190zshutil.copytreeN)r�rdrer�r�r�r�r�)r5rtr2�scandir�listr�)	rdrer�r�r�r�r��itrr�s	&&&&&&&  rr�r�csU��P�I�I���*�	���C���C��s�)��191��W�#��"�.F�#0�2�2�192��s�A�A+	�st_file_attributesc���\P!VP4;'gGVP\P,;'dVP193\P8H#rh)r`�S_ISLNKrxr��FILE_ATTRIBUTE_REPARSE_POINTr�r��r�s&r�_rmtree_islinkr��sX�����R�Z�Z�(�J�J�
�
"�
"�T�%F�%F�
F�I�I��%�%��)H�)H�H�	Krc�B�\P!VP4#rh)r`r�rxr�s&rr�r��s���|�|�B�J�J�'�'rc�xa�Ve\R4h\P!V4p\	T4'd\R4hT3Rlp\P!TRT\PR7pTF�wrxp	TF9p194\P195PYz4p\P!T4K;	T	F9p196\P197PYz4p\P!T4K;	K�	\P!T4R# \d#pS!\PY4Rp?R#Rp?ii;i \d-pS!\P198PY4Rp?R#Rp?ii;i \dEK\d$pS!\PY�4Rp?EK:Rp?ii;i \dEK\d$pS!\PY�4Rp?EK:Rp?ii;i \dR#\d#pS!\PY4Rp?R#Rp?ii;i)Nz#dir_fd unavailable on this platform�%Cannot call rmtree on a symbolic linkc�|<�\V\4'g%S!\PVPV4R#R#rh)r\r�r2r�r$)r.�onexcs&�r�onerror�_rmtree_unsafe.<locals>.onerror�s*����#�0�1�1��"�*�*�c�l�l�C�0�2rF)�topdownr��followlinks)
r�r2r�r"r�r_rn�walk�_walk_symlinks_as_filesr��rmdirr��unlink)r_�dir_fdr�r�r.r��results�dirpath�dirnames�	filenamesr#�fullnames&&f         r�_rmtree_unsafer�s����
��!�"G�H�H��
�X�X�d�^����"����A�B�B��1��g�g�d�E�7��Hb�Hb�c�G�(/�$��9��D��w�w�|�|�G�2�H�
/�����"���D��w�w�|�|�G�2�H�
0��	�	�(�#��)0�"#�199������C��
�b�h�h��"�������
�b�g�g�n�n�d�(�����%�
���
/��b�h�h��.�.��
/��%�
���
0��b�i�i��/�/��
0���
���#�
�b�h�h��"�"��#�s��D�E�!F� G�?G?�E�"D?�?E�E>�!E9�9E>�F=�F=�F=�F8�8F=�G<�G<�G<�G7�7G<�?H9�
H9�H9�H4�4H9c��\V\4'd\P!V4p\PWR3.pV'd\W24KV'dCVP
4wrErV\PJdK1\P!V4KJR# \d#pT!\PY4Rp?KtRp?ii;i T'dsTP
4wrErT\PJdK1\P!T4KJ \d#pT!\PY4Rp?KrRp?ii;ii;irh)	r\�bytesr2r�r��_rmtree_safe_fd_step�pop�closer")r_rr��stack�func�fd�entryr.s&&&     r�_rmtree_safe_fdr�s����$�����{�{�4� ���h�h��d�
+�,�E�+�� ��.���$)�I�I�K�!�D�d��2�8�8�#��
+���������
+��b�h�h��*�*��
+��
�$)�I�I�K�!�D�d��2�8�8�#��
+��������
+��b�h�h��*�*��
+��
�sZ�C�200
C�201B$�$C�/C�C�E�)E�D�E�E�*E�E�E�Ec��VP4wr#rEVfTMVPpV\PJd\P!V4R#V\PJd\P!WcR7R#V\P202JgQhVf\P203!WcR7pMVP
RR7p\Pp\P!V\P\P,VR7p\PPp\PPV\P!V44'g\R4hVP\PW4V34VP\PW�V34\P p\P !V4;_uu_4p	\#V	4p204RRR4X205F�p\PP%WKP4pVP'RR7'd%VP\P206W�V34Ki\P*!TPTR7K�	R# TP\PY�T34i;i +'giL�;i \(dK�\dL}i;i \(dK�\d$p
T!\P*Y�4Rp
?
EK!Rp
?
ii;i \(d9p
TeT\PJdYMnT!Y$T
4Rp
?
R#Rp
?
R#Rp
?
i\dp
YMnT!Y$T
4Rp
?
R#Rp
?
ii;i)N)rFr�r�)rr#r2rrr�r`r|�O_RDONLY�207O_NONBLOCKr_rnrZr3r"r�r�r�r�r�r�rr$)rr�r�dirfdr_�208orig_entryr#�orig_st�topfd�209scandir_itr�rrr.s&&            rrr�s���%*�I�I�K�!�D���%�4�:�?�?�D�6��2�8�8���H�H�U�O���2�8�8���H�H�T�(���r�x�x�������h�h�t�2�G� �o�o�e�o�<�G��w�w������b�k�k�B�M�M�9�%�H���w�w�~�~��	>��7�7�#�#�G�R�X�X�e�_�=�=��E�F�F��L�L�"�(�(�E��<�=��L�L�"�(�(�E��<�=��z�z��
�Z�Z��
�
�*��:�&�G���E��w�w�|�|�D�*�*�5�H�
��<�<��<�6�6��L�L�"�(�(�E�U�!C�D��7�
0��	�	�%�*�*�U�3���
�L�L�"�(�(�E��<�=���
��%�
���
��
��%�
���
0��b�i�i��/�/��
0���#�������!1��L��$�c�"�"�"2������
�d�#�����s��*L!�+L!�B*L!�+9J�%-J�AL!�"J2�.6L!�%:K�L!�#"K#�L!�$J/�/L!�2K	�=L!�K �L!�K �K �L!�K � L!�#L�.L!�1L�:L�;L�L!�L�L!�!N�,'M�N�,N�-N�Nr�rc�a�\P!RW4V'dRpMSf	VfRpMVfSfRpMV3Rlp\WV4R#)a�Recursively delete a directory tree.210 211If dir_fd is not None, it should be a file descriptor open to a directory;212path will then be relative to that directory.213dir_fd may not be implemented on your platform.214If it is unavailable, using it will raise a NotImplementedError.215 216If ignore_errors is set, errors are ignored; otherwise, if onexc or217onerror is set, it is called to handle the error with arguments (func,218path, exc_info) where func is platform and implementation dependent;219path is the argument to that function that caused it to fail; and220the value of exc_info describes the exception. For onexc it is the221exception instance, and for onerror it is a tuple as returned by222sys.exc_info().  If ignore_errors is false and both onexc and223onerror are None, the exception is reraised.224 225onerror is deprecated and only remains for backwards compatibility.226If both onerror and onexc are set, onerror is ignored and onexc is used.227z
shutil.rmtreec��R#rhr
r�s*rr��rmtree.<locals>.onexcAs��rNc��hrhr
r�s*rr�r!Ds��rc��hrhr
r�s*rr�r!Hs��rc�\<�VwrpVfRpM\V4W3P3pS!WV4#)N)NNN)�type�
__traceback__)r�rr_r��exc_infor�s*    �rr�r!Ls7���"&���C��;�/�H�#�C�y�#�/@�/@�@�H��t�8�4�4r)r5rt�_rmtree_impl)r_�
ignore_errorsr�r�rs&&f$$r�rmtreer**sI���*�I�I�o�t�,��	�	��U�]�	�	���?�
�
5���u�%rc��\P!V4p\PP\PP;'gR,p\PPVP
V44#)a A basename() variant which first strips the trailing slash, if present.228Thus we always get the last component of the path, even for directories.229 230path: Union[PathLike, str]231 232e.g.233>>> os.path.basename('/bar/foo')234'foo'235>>> os.path.basename('/bar/foo/')236''237>>> _basename('/bar/foo/')238'foo'239�)r2r�r_�sep�altsepr��rstrip)r_r-s& r�	_basenamer0ZsQ���9�9�T�?�D�240�'�'�+�+������-�-�2�241.�C�
�7�7���D�K�K��,�-�-rc��\P!RW4Tp\PP	V4'd�\W4'd>\PP
V4'g\P!W4R#\PPV\V44p\PPV4'd\RV,4h\P!W4V# \Edt\PP
T4'dF\P!T4p\P!YC4\P!T4T#\PP	T4'd�\!Y4'd\RT:RT:R24h\#T4'g]\P$!T\P&4'gF\P(!T4'd*\P*R8Xd\-RT:R	T:R24h\/YTR242R7\1T4T#T!Y4\P!T4T#i;i)a�Recursively move a file or directory to another location. This is243similar to the Unix "mv" command. Return the file or directory's244destination.245 246If dst is an existing directory or a symlink to a directory, then src is247moved inside that directory. The destination path in that directory must248not already exist.249 250If dst already exists but is not a directory, it may be overwritten251depending on os.rename() semantics.252 253If the destination is on our current filesystem, then rename() is used.254Otherwise, src is copied to the destination and then removed. Symlinks are255recreated under the new name if os.rename() fails because of cross256filesystem renames.257 258The optional `copy_function` argument is a callable that will be used259to copy the source or it will be delegated to `copytree`.260By default, copy2() is used, but any function that supports the same261signature (like copy()) can be used.262 263A lot more could be done here...  A look at a mv.c shows a lot of264the issues this implementation glosses over.265 266zshutil.moveNz$Destination path '%s' already existszCannot move a directory 'z' into itself 'z'.�darwinz%Cannot move the non-empty directory 'z ': Lacking write permission to 'T)r�r�)r5rtr2r_r�rfrn�renamer�r0r�r	r"r{rzr�267_destinsrc�
_is_immutable�access�W_OK�listdir�platform�PermissionErrorr�r*)rdrer��real_dstr�s&&&  r�mover<ls���4�I�I�m�S�&��H�	�w�w�}�}�S����S���r�w�w�~�~�c�':�':�
�I�I�c����7�7�<�<��Y�s�^�4��
�7�7�>�>�(�#�#��>��I�J�J��268�	�	�#� �,�O��+��
�7�7�>�>�#����[�[��%�F��J�J�v�(��I�I�c�N�"�O�!�W�W�]�]�3�
�
��#�#�#��(+�S�2�3�3��c�"�"��I�I�c�2�7�7�3�3��269�270�3����L�L�H�4�%�),�c�'3�4�4�
�S�-�"�
$��3�K��O�
�#�(��I�I�c�N��O�+�s9�.D�0J�7AJ�<$J�!A J�J�AJ�#J�Jc���\PPV4p\PPV4pVP\PP4'g"V\PP,
pVP\PP4'g"V\PP,
pVPV4#rh)r2r_rb�endswithr-�271startswithrcs&&rr4r4�s���272�'�'�/�/�#�273�C�274�'�'�/�/�#�275�C��<�<������$�$��r�w�w�{�{����<�<������$�$��r�w�w�{�{����>�>�#��rc��\V4p\P\P.p\	VR4;'dVP276V9#)r�)rkr`�UF_IMMUTABLE�SF_IMMUTABLEr^r�)rdr��immutable_statess&  rr5r5�sA��	�s��B��)�)�4�+<�+<�=���2�z�"�F�F�r�{�{�6F�'F�Frc��VfR#^RIHpT!T4pTe277T^,#R# \dR#i;i \dRpL0i;i)z"Returns a gid, given a group name.N)�getgrnam)�grprE�ImportError�KeyError)r#rE�results&  r�_get_gidrJ��^���|��� ���$������a�y���������278�������&�8�5�5�
A�Ac��VfR#^RIHpT!T4pTe279T^,#R# \dR#i;i \dRpL0i;i)z"Returns an uid, given a user name.N)�getpwnam)�pwdrNrGrH)r#rNrIs&  r�_get_uidrP�rKrLc	��aaaa�VfRp	Mr\'dVR8XdRp	M\\'dVR8XdRp	MF\'dVR8XdRp	M0\'dVR8XdRp	M\	R	PV44h^RIp280V'd281R282V	,MRpVR,V,p\PPV4p
V
'dZ\PPV
4'g5VeVPRV
4V'g\P!V
4VeVPR
4\S4o\S4oVVVV3RlpV'gdV283PVRV	,4pTpVe \PP!W�4pVP#VVVR7VP%4Ve \PP'V4pV# TP%4i;i)a�Create a (possibly compressed) tar file from all the files under284'base_dir'.285 286'compress' must be "gzip" (the default), "bzip2", "xz", "zst", or None.287 288'owner' and 'group' can be used to define an owner and a group for the289archive that is being built. If not provided, the current owner and group290will be used.291 292The output tar file will be named 'base_name' +  ".tar", possibly plus293the appropriate compression extension (".gz", ".bz2", ".xz", or ".zst").294 295Returns the output filename.296Nr,�gzip�gz�bzip2�bz2�xz�zstzCbad value for 'compress', or compression format not supported : {0}�.�.tar�creating %szCreating tar archivec�P<�SeSVnSVnSeSVnSVnV#rh)�gid�gname�uid�uname)�tarinfor\�group�ownerr^s&����r�_set_uid_gid�#_make_tarball.<locals>._set_uid_gids.����?��G�K�!�G�M��?��G�K�!�G�M��rzw|%s�r�)�_ZLIB_SUPPORTED�_BZ2_SUPPORTED�_LZMA_SUPPORTED�_ZSTD_SUPPORTED�297ValueErrorru�tarfiler2r_�dirnamer��infor�rPrJr|r��addrrb)�	base_name�base_dir�compress�verbose�dry_runrbra�logger�root_dir�tar_compressionrk�compress_ext�archive_name�archive_dirrc�tar�arcnamer\r^s&&&&&ff&&        @@r�
_make_tarballr|�s���� ����	��X��/���	��H��/���	��X��-���	��X��.����+�+1�6�(�+;�=�	=��,4�3��(�"�L��v�%��4�L��'�'�/�/�,�/�K��2�7�7�>�>�+�6�6����K�K�
�{�3���K�K��$������*�+�298�5�/�C�299�5�/�C�����l�l�<��/�)A�B�������w�w�|�|�H�7�H�	��G�G�H�g�l�G�;��I�I�K����w�w���|�4�����	
�I�I�K�s� G)�)G;c��^RIpVR,p	\PPV4p300V301'dZ\PP	V3024'g5VeVPRV3034V'g\P!V3044VeVPRW�4V'EgiVPV	RVPR7;_uu_4p\PPV4pVe \PPWq4p\PPV4pV\P8wd(VPW4VeVPRV4\P!V4EF�wr�pT
pVe!\PPVV4p\PPV4p\V4Fmp\PPV
V4p\PPVV4pVPVV4VfK[VPRV4Ko	VF�p\PPV
V4p\PPV4p\PP!V4'gKi\PPVV4pVPVV4VfK�VPRV4K�	EK�	RRR4Ve \PP#V	4p	V	# +'giL5;i)z�Create a zip file from all the files under 'base_dir'.305 306The output zip file will be named 'base_name' + ".zip".  Returns the307name of the output zip file.308N�.ziprZz#creating '%s' and adding '%s' to it�w)�compressionzadding '%s')�zipfiler2r_rlr�rmr��ZipFile�ZIP_DEFLATED�normpathr��curdirrIr�relpath�sorted�isfilerb)rorprrrsrtrbrarur��zip_filenamery�zfr{rr	r309�310arcdirpathr#r_s&&&&&&&&           r�
_make_zipfiler�(s_����v�%�L��'�'�/�/�)�,�K��2�7�7�>�>�+�6�6����K�K�
�{�3���K�K��$�
�����9� �	,��7�
�_�_�\�3�)0�)=�)=��?�?�BD��g�g�&�&�x�0�G��#��7�7�<�<��;���w�w�'�'��1�H��"�)�)�#�����+��%��K�K�
�x�8�02����0A�,��9�$�311��'�!#������X�!F�J��W�W�-�-�j�9�312�"�8�,�D��7�7�<�<���6�D� �g�g�l�l�:�t�<�G��H�H�T�7�+��)����M�4�8�-�&�D��7�7�<�<���6�D��7�7�+�+�D�1�D��w�w�~�~�d�+�+�"$�'�'�,�,�z�4�"@������w�/�!�-�"�K�K�
�t�<�&�1B�?�<���w�w���|�4����A?�?�s �E!L:�9A<L:�:3L:�2L:�:M313	rzzuncompressed tar filezgzip'ed tar-file�gztarzZIP file�zipzbzip2'ed tar-file�bztarzxz'ed tar-file�xztarzzstd'ed tar-file�zstdtarc��\P4UUu.uFwrW^,3NK	pppVP4V#uuppi)z�Returns a list of supported formats for archiving and unarchiving.314 315Each element of the returned sequence is a tuple (name, description)316)�_ARCHIVE_FORMATS�items�sort)r#�registry�formatss   r�get_archive_formatsr�~sI�� �%�%�'�)�'�(6�t��q�k�"�'��)��L�L�N��N��)s�Ac�<�Vf.p\V4'g\RV,4h\V\\34'g\R4hVF:p\V\\34'd\V4^8wgK1\R4h	WV3\V&R#)a]Registers an archive format.317 318name is the name of the format. function is the callable that will be319used to create archives. If provided, extra_args is a sequence of320(name, value) tuples that will be passed as arguments to the callable.321description can be provided to describe the format, and will be returned322by the get_archive_formats() function.323NzThe %s object is not callablez!extra_args needs to be a sequencez+extra_args elements are : (arg_name, value))�callable�	TypeErrorr\�tupler��lenr�)r#�function�324extra_args�description�elements&&&& r�register_archive_formatr��s������325��H����7�(�B�C�C��j�5�$�-�0�0��;�<�<����'�E�4�=�1�1�S��\�A�5E��I�J�J��'�K�@��T�rc��\VR#rh)r��r#s&r�unregister_archive_formatr��s326����rc	���\P!RWW#4\V,p	RTRTRTRT/p327T	^,pT	^,F	wr�Y�T&K	Tf\328Pp\TRR	4pRpTe�\329P!T4Pp\P!T4'g\\PR330T4hT'd\331P!T4pY*R&Mh\332P!4pTeTP!RT4\333P"P%T4pT'g\334P&!T4T!Y3/T335BpTe-TeTP!R
T4\336P&!T4T# \d\	RT,4Rhi;i Te.TeTP!R
T4\337P&!T4ii;i)a�Create an archive file (eg. zip or tar).338 339'base_name' is the name of the file to create, minus any format-specific340extension; 'format' is the archive format: one of "zip", "tar", "gztar",341"bztar", "xztar", or "zstdtar".  Or any other registered format.342 343'root_dir' is a directory that will be the root directory of the344archive; ie. we typically chdir into 'root_dir' before creating the345archive.  'base_dir' is the directory where we start archiving from;346ie. 'base_dir' will be the common prefix of all files and347directories in the archive.  'root_dir' and 'base_dir' both default348to the current directory.  Returns the name of the archive file.349 350'owner' and 'group' are used when creating a tar archive. By default,351uses the current owner and group.352zshutil.make_archivezunknown archive format '%s'Nrsrtrbra�supports_root_dirFzNot a directoryruzchanging into '%s'zchanging back to '%s')r5rtr�rHrjr2r�r�r`rx�S_ISDIR�NotADirectoryErrorr&�ENOTDIRr��getcwd�debugr_rb�chdir)rorururprrrsrbrart�format_infor�r�arg�valr��save_cwd�stmdr$s&&&&&&&&&         r�make_archiver��s���$�I�I�#�Y��K�K�&�v�.����(�F��u�g�u�.�F��q�>�D���N�N����s��#����9�9����&9�5�A���H����w�w�x� �(�(���|�|�D�!�!�$�U�]�]�4E�x�P�P���	�	�)�,�I�!)�:���y�y�{�H��!����1�8�<������	�2�I������"���	�6�v�6�����!����4�h�?��H�H�X���O��Q�K��6��?�@�d�J�K��F���!����4�h�?��H�H�X�� �s�
F�	F7�F4�73G*c��\P4UUu.uFwrW^,V^,3NK	pppVP4V#uuppi)z�Returns a list of supported formats for unpacking.353 354Each element of the returned sequence is a tuple355(name, extensions, description)356)�_UNPACK_FORMATSr�r�)r#rmr�s   r�get_unpack_formatsr��sO���$�$�&�(�&�-7�D��1�g�t�A�w�'�&��(��L�L�N��N��(s�A357c���/p\P4FwrEV^,FpWCV&K		K	VF$pWs9gKRp\W�W7,3,4h	\V4'g\	R4hR#)z+Checks what gets registered as an unpacker.z!%s is already registered for "%s"z*The registered function must be a callableN)r�r�rr�r�)	�358extensionsr�r��existing_extensionsr#rm�ext�	extension�msgs	&&&      r�_check_unpack_optionsr��s�����%�+�+�-�359����7�7�C�'+��$��.� �	��+�5�C���':�'E�'G�!G�H�
H� ��H����D�E�E�rc�@�Vf.p\WV4WW43\V&R#)a!Registers an unpack format.360 361`name` is the name of the format. `extensions` is a list of extensions362corresponding to the format.363 364`function` is the callable that will be365used to unpack archives. The callable will receive archives to unpack.366If it's unable to handle an archive, it needs to raise a ReadError367exception.368 369If provided, `extra_args` is a sequence of370(name, value) tuples that will be passed as arguments to the callable.371description can be provided to describe the format, and will be returned372by the get_unpack_formats() function.373N)r�r�)r#r�r�r�r�s&&&&&r�register_unpack_formatr��s(��"���374��*�375�;�&�*�I�O�D�rc��\VR#)z*Removes the pack format from the registry.N)r�r�s&r�unregister_unpack_formatr�s376����rc��\PPV4p\PPV4'g\P!V4R#R#)z1Ensure that the parent directory of `path` existsN)r2r_rlr�r�)r_rls& r�_ensure_directoryr�s8���g�g�o�o�d�#�G�
�7�7�=�=��!�!�377���G��"rc378���^RIpVPV4'g\RV,4hVPV4pVP	4F�pVP379pVP
R4'gRV9dK/\PP!V.VPR4O5!pV'gKj\V4VPR4'dK�VPVR4;_uu_4p\VR4;_uu_4p\Wx4RRR4RRR4K�	VP4R# +'giL.;i +'giEK;i TP4i;i)z+Unpack zip `filename` to `extract_dir`380    Nz%s is not a zip file�/z..�rrs)r��381is_zipfilerr��infolistr$r?r2r_r��splitr�r>r|rXr)	r$�extract_dirr�r�rmr#�382targetpath�source�targets	&&       r�_unpack_zipfiler�s������h�'�'��.��9�:�:�383�/�/�(�384#�C���L�L�N�D��=�=�D����s�#�#�t�t�|�������k�D�D�J�J�s�O�D�J����j�)��=�=��%�%��X�X�d�C�(�(�F��Z��.�.�&���/�/�)�(�#�$	�	�	��/�.��)�(�(��	�	�	��sI�A7E'�8!E'�E'�8E�
D?�E�!E'�?E�385E�E$�386E'�'E9r�c���^RIpVPV4pTP	YR7TP4R# TPd\RT,4hi;i TP4i;i)zIUnpack tar/tar.gz/tar.bz2/tar.xz/tar.zst `filename` to `extract_dir`387    Nz/%s is not a compressed or uncompressed tar filere)rkr|�TarErrorr�388extractallr)r$r�r�rk�tarobjs&&$  r�_unpack_tarfiler�;sv���J����h�'������+��5������
���J��=��H�J�	J�J��	����s�<�A#�$A �#A5rYr~z.tar.gzz.tgzz.tar.bz2z.tbz2z.tar.xzz.txzz.tar.zstz.tzstc��\P4F2wrV^,F pVPV4'gKVuu#	K4	R#)�N)r�r�r>)r$r#rmr�s&   r�_find_unpack_formatr�csB��%�+�+�-�389���a���I�� � ��+�+���!�.�rc�n�\P!RWV4Vf\P!4p\P!V4p\P!V4pVf/pMRV/pVe5\390V,pT^,pT!Y3/\T^,4BTBR#\V4pVf\RPV44h\391V,^,p\\392V,^,4V,pV!W3/VBR# \d\RPT44Rhi;i)a<Unpack an archive.393 394`filename` is the name of the archive.395 396`extract_dir` is the name of the target directory, where the archive397is unpacked. If not provided, the current working directory is used.398 399`format` is the archive format: one of "zip", "tar", "gztar", "bztar",400"xztar", or "zstdtar".  Or any other registered format.  If not provided,401unpack_archive will use the filename extension and see if an unpacker402was registered for that extension.403 404In case none is found, a ValueError is raised.405 406If `filter` is given, it is passed to the underlying407extraction function.408zshutil.unpack_archiveNr�zUnknown unpack format '{0}'zUnknown archive format '{0}')r5rtr2r�r�r�rHrjru�dictr�r)r$r�rur��
filter_kwargsr�rr�s&&&$    r�unpack_archiver�js��$�I�I�%�x�f�E����i�i�k���)�)�K�(�K��y�y��"�H�
�~��
�!�6�*�
�
��	U�)�&�1�K��1�~���X�L�d�;�q�>�&:�L�m�L�%�X�.���>��:�A�A�(�K�L�L��v�&�q�)���o�f�-�a�0�1�M�A���X�-�f�-���	U��:�A�A�&�I�J�PT�T�	U�s�.
D
�
'D4�statvfs�409disk_usage�usageztotal used freezTotal space in byteszUsed space in byteszFree space in bytesc��\P!V4pVPVP,pVPVP,pVPVP410,411VP,p\
W4V4#)z�Return disk usage statistics about the given path.412 413Returned value is a named tuple with attributes 'total', 'used' and414'free', which are the amount of total, used and free space, in bytes.415)r2r��f_bavail�f_frsize�f_blocks�f_bfree�_ntuple_diskusage)r_r��free�total�useds&    rr�r��s^���Z�Z��
���{�{�R�[�[�(�����b�k�k�)�����b�j�j�(�B�K�K�7�� ��d�3�3rc�Z�\P!V4wrW,416p\WV4#)z�Return disk usage statistics about the given path.417 418Returned values is a named tuple with attributes 'total', 'used' and419'free', which are the amount of total, used and free space, in bytes.420)r�
_getdiskusager�)r_r�r�r�s&   rr�r��s*���&�&�t�,����|�� ��d�3�3rc��\P!RWV4VfVf\R4hTpTpVfRpM?\V\4'd*\V4pVf\
RPV44hVfRpM?\V\4'g*\V4pVf\
RPV44h\P!WWcVR7R#)a�Change owner user and group of the given path.421 422user and group can be the uid/gid or the user/group names, and in that case,423they are converted to their respective uid/gid.424 425If dir_fd is set, it should be an open file descriptor to the directory to426be used as the root of *path* if it is relative.427 428If follow_symlinks is set to False and the last element of the path is a429symbolic link, chown will modify the link itself and not the file being430referenced by the link.431zshutil.chownNzuser and/or group must be setzno such user: {!r}zno such group: {!r})rrp�����)r5rtrjr\r�rP�LookupErrorru�intrJr2�chown)r_�userrarrp�_user�_groups&&&$$  rr�r��s����I�I�n�d�%�0��|��
��8�9�9��E�
�F��|���	�D�#�	�	������=��2�9�9�$�?�@�@��}���
��s�
#�
#��%����>��3�:�:�5�A�B�B��H�H�T�&�,�.rc��\\PR,4p\\PR,4pV^8:gV^8:d|\P432!\PP44pV^8:dVP;'g433V^,pV^8:dVP;'g434V^,p\P!W34# \\3d^pL�i;i \\3d^pL�i;i \\\3d\P!T4pL�i;i)a�Get the size of the terminal window.435 436For each of the two dimensions, the environment variable, COLUMNS437and LINES respectively, is checked. If the variable is defined and438the value is a positive integer, it is used.439 440When COLUMNS or LINES is not defined, which is the common case,441the terminal connected to sys.__stdout__ is queried442by invoking os.get_terminal_size.443 444If the terminal size cannot be successfully queried, either because445the system doesn't support querying, or because we are not446connected to a terminal, the value given in fallback parameter447is used. Fallback defaults to (80, 24) which is the default448size used by many terminal emulators.449 450The value returned is a named tuple of type os.terminal_size.451�COLUMNS�LINES)r�r2�environrHrj�get_terminal_sizer5�452__stdout__r �AttributeErrorr"�
terminal_size�columns�lines)�fallbackr�r��sizes&   rr�r��s��(��b�j�j��+�,����B�J�J�w�'�(��453�!�|�u��z�	.��'�'����(=�(=�(?�@�D�454�a�<��l�l�1�1�h�q�k�G��A�:��J�J�-�-�(�1�+�E�
���W�,�-�-��+
�j�!������455
�j�!�������456�G�4�	.��#�#�H�-�D�	.�s4� C#� C<�2D�#C9�8C9�<D�D�,E�Ec���\PPV4;'dC\P!W4;'d%\PP	V4'*#rh)r2r_r�r6r�)rjr�s&&r�
_access_checkr�sI���G�G�N�N�2��
&�
&�2�9�9�R�#6�
&�
&��G�G�M�M�"�%�%�'rc��V\P,'*;'g+\P!\P!V44#)z�457On Windows, we can use NeedCurrentDirectoryForExePath to figure out458if we should add the cwd to PATH when searching for executables if459the mode is executable.460)r2�X_OKr��NeedCurrentDirectoryForExePathr�)�cmdr�s&&r�_win_path_needs_curdirrs:������� �"�"�W�%K�%K����C� �&"�"rc�a�\V\4p\PP	V4wr@V'dV.pEM6Vf<\P461P
RR4pVf\P!R4pV'gR#V'dK\P!V4pVP	\P!\P44pM5\P!V4pVP	\P4p\PR8XdR\!W4'dA\P"pV'd\P!V4pVP%^V4\PR8XEd1\P&!R4;'g\(pVP	\P4pVUu.uFq�'gKVP+R4NK	ppV'd&VUu.uFp\P!V4NK	ppVUu.uFq�V,NK
	p	pVP-4oV\P.,'dA\0;QJdV3RlV4F'gKRM	R	M!V3RlV44'dV	P%^V4MV.p	\34p462VFzp\PP5V4pW�9gK*V463P7V4V	F9p
\PP9W�4p\;W�4'gK5Vuu#	K|	R# \\3d\PpEL�i;iuupiuupiuupi)464aGiven a command, mode, and a PATH string, return the path which465conforms to the given mode on the PATH, or None if there is no such466file.467 468`mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result469of os.environ.get("PATH"), or can be overridden with a custom search470path.471 472N�PATH�CS_PATHr�PATHEXTrXc3�b<"�TF$pSPVP44x�K&	R#5irh)r>�upper)�.0r��normcmds& �r�	<genexpr>�which.<locals>.<genexpr>gs'����&X�PW��w�'7�'7��	�	��'D�'D�PW�s�,/TF)r\rr2r_r�r��get�confstrr�rj�defpath�fsencode�pathsepr�r5r9rr��insert�getenv�_WIN_DEFAULT_PATHEXTr/r	r�anyr�rarnr�r�)rr�r_�	use_bytesrlr��pathext_source�pathextr��files�seen�dir�normdir�thefiler#rs&&&            @r�whichr'sl����3��&�I�473�7�7�=�=��%�L�G���y���<��:�:�>�>�&�$�/�D��|�&��:�:�i�0�D�����;�;�t�$�D��:�:�b�k�k�"�*�*�5�6�D��;�;�t�$�D��:�:�b�j�j�)�D��<�<�7�"�'=�c�'H�'H��Y�Y�F�����V�,���K�K��6�"�474�|�|�w�����9�-�E�E�1E�� �&�&�r�z�z�2��.5�=�g�s��?�3�:�:�c�?�g��=��3:�;�7�C�r�{�{�3�'�7�G�;�&-�.�g�s�s���g��.��)�)�+���r�w�w���3�3�&X�PW�&X�3�3�3�&X�PW�&X�#X�#X��L�L��C� ������5�D����'�'�"�"�3�'�����H�H�W�� ���w�w�|�|�C�1�� ��,�,��K�!�	���q'�475�3�&��:�:�D�&��8>��<��.s*�)M�	M3�!M3�M8�)M=�!M0�/M0c��VR8Xd,^RIpVPRVPR2RR7\#\	R\476:RV:24h)�	ExecErrorNzshutil.ExecErrorz); it isn't raised by any shutil function.)�removezmodule z has no attribute )��)�warnings�_deprecated�_DEPRECATED_MSG�RuntimeErrorr�r)r#r%s& r�__getattr__r)ys]���{��������'�'�(�)3�
3��		�	477���478�7�8�,�.@���I�479J�Jrii)�linux�android�sunos)rXr�r�r�r�r�r�r<r*r	r480r�r�r�r�r�r�r�r�r�r�rr�r)r�)F)FN)rRr�r�NNNN)r�r�NNNN)rqN)rqrR)rqrT)rqrV)rqrW)Nr,)NNr�r�NNN)NN))�P�)prr2r5r`r��collectionsr&�zlibrfrGrUrg�lzmarhr�rrir#ryrrr9r�rTr^r?rDrr}r�__all__r"r	rr481rr!rrr/r9rArFrRrXrfrkror�r�r�r�r�r�r�r�r��stat_resultr�rrrr|rr�supports_dir_fdr��supports_fdr��_use_fd_functionsr(r*�avoids_symlink_attacksr0r<r4r5rJrPr|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��482namedtupler�r�r�r�r�r�r�r�r�F_OKrrr)r
rr�<module>r:s����483�484���������O�����N�����O�� ���O��7�7�d�?��
�����7�7�g���
�
��<�<�7����G�&�{�J���B�485�+�O�O����/�/�0M�N��!�"�&7�8���7�7�7�5�,�7��?����	�G�	�@�E�@�;�w�;�4860��0�&�I�&��	��487 �(�&'�R1�f.:��(�4�$E�R�F�$�F�P.�$�.�4�2�{������0
�@�$�@�D�d��$&�t�&�P488�@�D!&�d�%�&+�5�.2�`�2�>�>�/�0�0�K�489(�*#�Z+�&E�N�g�g�r�w�w��	�	�2�8�8�<��'�'�(�<�<��Z�Z�2�>�>�1�<�<��W�W�� ;� ;�;��#4����*&�T�*&�$�*&�\!2���.�$"'�@�D�G�490�$�$F�P7�r#'�
��"&�
��491�m�0�1�%�'���492�!.�1E�0F� 2�!4��W��,�b�*�=��U���!.�1F�0G� 3�!5��W���!.�1C�0D� 0�!2��W���#0�3F�2G�"4�#6��Y���A�*�=�@	�F�$J�,���<�T��(493�v�h���-D�
E�	�v�h���Z�
8���494�!*�F� 3�_�b� 2� 4�O�G���!+�W� 5��� 3� 5�O�G���!*�F� 3�_�b� 0� 2�O�G���#-�w�"7��"�"4�"6�O�I���..�d�..�b�2�y����N�N�<� �#�.�.�w�8I�J��&<����#�%:����"�%:����"�4954���N�N�<� �#�.�.�w�8I�J��4�&.��&.�t�&.�P+.�b'�496"��G�G�b�g�g�%�D�P�d497K��O3���O������N������O������O��sD�Q�Q�Q#�	Q3�	Q�Q�	Q �Q �#	Q0�/Q0�3	R�?R
codekingpro/portable-devtools · Team Ai