Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
glob.cpython-314.pyc197 linesDownload Raw Back to __pycache__
1+
2��i Q��"�Rt^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RI	t	.R(Ot3RRRRRRRR/RltRRRRRRRR/RltR)R	lt
R)R4ltR)RltRtR
tRtR)RltRtRtR)RltRtRtRt]P4!R4t]P4!R4tRtRtRtRt R*t!]PD]#!]R^4,t$]%!4t&RRRRRR/Rlt']PP!RR 7R+R!l4t)!R"R#4t*!R$R%]*4t+!R&R']*4t,R#),zFilename globbing utility.N�root_dir�dir_fd�	recursiveF�include_hiddenc5�0�\\WW#VR74#)a�Return a list of paths matching a `pathname` pattern.6 7The pattern may contain simple shell-style wildcards a la8fnmatch. Unlike fnmatch, filenames starting with a9dot are special cases that are not matched by '*' and '?'10patterns by default.11 12The order of the returned list is undefined. Sort it if you need a13particular order.14 15If `root_dir` is not None, it should be a path-like object specifying the16root directory for searching. It has the same effect as changing the17current directory before calling it (without actually18changing it). If pathname is relative, the result will contain19paths relative to `root_dir`.20 21If `dir_fd` is not None, it should be a file descriptor referring to a22directory, and paths will then be relative to that directory.23 24If `include_hidden` is true, the patterns '*', '?', '**'  will match hidden25directories.26 27If `recursive` is true, the pattern '**' will match any files and28zero or more directories and subdirectories.29)rrrr)�list�iglob)�pathnamerrrrs&$$$$�Lib\glob.py�globrs��6��h�&�%3�5�6�6�c	��\P!RW4\P!RWW4Ve\P!V4pM	VR,p\	WW#RVR7pV'd!V'dG\VR,4'd/\
V4pV'd\P!V3V4pV#V# \dT#i;i)a�Return an iterator which yields the paths matching a `pathname` pattern.30 31The pattern may contain simple shell-style wildcards a la32fnmatch. However, unlike fnmatch, filenames starting with a33dot are special cases that are not matched by '*' and '?'34patterns.35 36The order of the returned paths is undefined. Sort them if you need a37particular order.38 39If `root_dir` is not None, it should be a path-like object specifying40the root directory for searching. It has the same effect as changing41the current directory before calling it (without actually42changing it). If pathname is relative, the result will contain43paths relative to `root_dir`.44 45If `dir_fd` is not None, it should be a file descriptor referring to a46directory, and paths will then be relative to that directory.47 48If `include_hidden` is true, the patterns '*', '?', '**'  will match hidden49directories.50 51If `recursive` is true, the pattern '**' will match any files and52zero or more directories and subdirectories.53z	glob.globzglob.glob/2�N�NF�r:N�N)54�sys�audit�os�fspath�_iglob�_isrecursive�next�	itertools�chain�
StopIteration)r	rrrr�it�ss&$$$$  r55rr.s���6�I�I�k�8�/��I�I�m�X�(�C����9�9�X�&���B�<��	��F�u�-�56/�B��y�\�(�2�,�%?�%?�	��R��A���_�_�a�T�2�.���I�2�I���	��
�I�	�s�+B;�;C57�	C58c	#� "�\PPV4wrg\V4'gUV'dQhV'd"\	\W4V4'dVx�R#\
\W4V4'dVx�R#V'gJV'd*\V4'd\WW$VR7Rjx�L59R#\WW$VR7Rjx�L60R#W`8wd"\V4'd\WaW#RVR7pMV.p\V4'd(V'd\V4'd\p	M
\p	M\p	VF@pV	!\W4WrVVR7F$p61\PPWj4x�K&	KB	R#L�L�5i)NrT)
r�path�split�	has_magic�_lexists�_join�_isdirr�_glob2�_glob1r�_glob0�join)r	rrr�dironlyr�dirname�basename�dirs�glob_in_dir�names&&&&&&     r62rrZsM������
�
�h�/��G��X�����{����h�1�6�:�:���63	��e�H�.��7�7�������h�/�/��h�&�,:�<�
<�
<�64	��h�&�-;�=�
=�
=����y��1�1��g��D�%3�5���y��������h�/�/� �K� �K�������h� 8�(�G�.<�>�D��'�'�,�,�w�-�-�>��+
<�
=�sC�:F�	F�A	F�F�"F�;F65�<F�F�AF�A.F�Fc��\WV4pV'g\V4'g66RV4p\P!WQ4#)c3�L"�TFp\V4'dKVx�K	R#5i�N)�	_ishidden)�.0�xs& r67�	<genexpr>�_glob1.<locals>.<genexpr>�s���6�E�q��1����E�s�$�68$)�_listdirr2�fnmatch�filter)r*�patternrr)r�namess&&&&& r69r&r&�s4���W�g�.�E��i��0�0�6�E�6���>�>�%�)�)rc��V'd"\\W4V4'dV.#.#\W4'dV.#.#r1)r"r#r$)r*r+rr)rs&&&&&r70r'r'�sE����E�'�,�f�5�5��:��6��I��'�"�"��:��
�Irz�{name} is deprecated and will be removed in Python {remove}. Use glob.glob and pass a directory to its root_dir argument instead.c�T�^RIpVPR\RR7\WRR4#)rNz71glob.glob0��removeF���)�warnings�_deprecated�_deprecated_function_messager'�r*r:rCs&& r72�glob0rG��*�������'C�G��T��'�D�%�0�0rc�T�^RIpVPR\RR7\WRR4#)rNz73glob.glob1r>Fr@)rCrDrEr&rFs&& r74�glob1rJ�rHrc#�"�\V4'gQhV'd\W4'dVR,x�\WVVR7Rjx�L75R#L5i)rrN)rr$�	_rlistdir)r*r:rr)rs&&&&&r76r%r%�sF����� � � � ��f�W�-�-��b�k����'�(6�8�8�8�s�A�-A�A�Ac#�2"�RpRpVeQV'd \P!V\VR7;r5MTp\V\4'd\P77pMLV'dTpMA\V\4'd\	\PR4pM\Pp\P!V4;_uu_4pVFLpV'dVP4'd+VeV!VP4x�K<VPx�KLKN	RRR4Ve\P!V4R#R# \dK�i;i +'giL@;i Te\P!T4ii;i \dR#i;i5i)N�r�ASCII)r�open�_dir_open_flags�78isinstance�bytes�fsencode�curdir�scandir�is_dirr.�OSError�close)r*rr)�fdrT�argr�entrys&&&     r79�_iterdirr]�s2����
��������7�7�7�O�F�K�K��S����'�5�)�)��;�;���
��C�
���
'�
'���	�	�7�+�C��)�)�C�
	����C���B��E��&�%�,�,�.�.�'�3�&.�u�z�z�&:� :�&+�j�j� 0�	+9� �!��~��������#�����!����~������������s��F�F�AF�$AF�)E%�E�E�,E�E�E�E�E%�"F�<F�E	�E�E	�E�E"	�E%�%F�F�F�F�F�Fc��\P!\WV44;_uu_4p\V4uuRRR4# +'giR#;ir1)�80contextlib�closingr]r)r*rr)rs&&& r81r7r7�s3��	�	�	�H�W�g�>�	?�	?�2��B�x�82@�	?�	?�	?�s	�?�A	c#��"�\WV4pVFYpV'g\V4'dKVx�V'd\W4MTp\WaVVR7Fp\WW4x�K	K[	R#5i)rN)r7r2r#rL)r*rr)rr;r4r�ys&&&&    r83rLrL�sY����W�g�.�E�
����1����G�(/�5��$�Q�D��t�W�.<�>���A�k�!�>�	�s�(A0�A0�5A0c��Vf \PPV4#\P!WR7R# \\843dR#i;i)NrNTF)rr�lexists�lstatrX�85ValueError)r	rs&&r86r"r"�sI��
�~��w�w���x�(�(��87����)���
�Z� ����s�>�A�Ac���Vf \PPV4#\P!WR7p\P!VP884# \\3dR#i;i)NrNF)rr�isdir�stat�S_ISDIR�st_moderXrf)r	r�sts&& r89r$r$�s[��
�~��w�w�}�}�X�&�&�(�
�W�W�X�
-���|�|�B�J�J�'�'��
�Z� ����s�A�A1�0A1c�x�V'd	V'g
T;'gT#\PPW4#r1)rrr()r*r+s&&r90r#r#�s(���(��"�"�(�"�
�7�7�<�<��*�*rz([*?[])s([*?[])c��\V\4'd\PV4pVRJ#\PV4pVRJ#r1)rRrS�magic_check_bytes�search�magic_check)r�matchs& r91r!r!sI���!�U���!�(�(��+�������"�"�1�%�����rc��V^,R9#)r)�.�.��rs&r92r2r2s����7�n�$�$rc�B�\V\4'dVR8H#VR8H#)s**�**)rRrS)r:s&r93rrs$���'�5�!�!��%����$��rc���\PPV4wr\V\4'd\94P
RV4pW,#\P
RV4pW,#)z#Escape all special characters.95    s[\1]z[\1])rr�96splitdriverRrSro�subrq)r	�drives& r97�escaper~s_��98�g�g�(�(��2�O�E��(�E�"�"�$�(�(��8�<������?�?�7�H�5����r�O_DIRECTORY�sepsc�p�V'gp\PP'd6\PP\PP3pM\PPpRP	\\PV44p\V4^8�dRVR2MTpRVR2pV'dVR2pVV2pRVR2p	Rp99MRVR	VR1002pVV2pRVR2p	V	RVR2p101.p\P!WP4p\V4^,102p
\V4F�wr�VR1038XdTPW�8dTMT4K'V'dJVR
8XdCW�8d*W�^,,R
8wdVPV	4KcKeVPV1044KxV'dXV'g V^,R9dVPR4VP\P!W�R1052V4^,4W�8gK�VPV4K�	RP	V4pRVR2#)a�Translate a pathname with shell wildcards to a regular expression.106 107If `recursive` is true, the pattern segment '**' will match any number of108path segments.109 110If `include_hidden` is true, wildcards can match path segments beginning111with a dot ('.').112 113If a sequence of separator characters is given to `seps`, they will be114used to split the pattern into segments and match path separators. If not115given, os.path.sep and os.path.altsep (where available) are used.116��[�]z[^�+z(?:.+z)?z.*z.]�*z(?:z)*ryz*?z(?!\.)z(?s:z)\z)rr�altsep�sepr(�map�rer~�lenr �	enumerate�append�extendr8�117_translate)�patrrr��escaped_seps�any_sep�not_sep�one_last_segment�one_segment�any_segments�any_last_segments�results�parts�
last_part_idx�idx�part�ress&$$$             r118�	translater�&s����
�7�7�>�>�>��G�G�K�K������0�D��7�7�;�;�D��7�7�3�r�y�y�$�/�0�L�%(��Y��]��,��q�!��G��<�.��"�G��%�Y�a�=��)�*�7�)�4���w�i�r�*�� ����~�R��y��:��)�*�7�)�4���[�M��,��+�n�C�0@�/A��D���G��H�H�W�"�E���J��N�M��u�%�	���3�;��N�N�#�*=�;�CS�T�
�4�4�<��"��q��>�T�)��N�N�<�0�*����0�1��%�$�q�'�T�/��N�N�9�-����w�1�1�$�)�1�
�w�O�PQ�R�S��"����w�'�&� 
�'�'�'�119�C��3�%�s��ri)�maxsizec��V'd\PM\Pp\WRVR7p\P!WTR7P120#)zOCompile given glob pattern to a re.Pattern object (observing case121sensitivity).T)rrr�)�flags)r��NOFLAG�122IGNORECASEr��compilerr)r�r��case_sensitiverr��regexs&&&&  r123�_compile_patternr�]s8��(�B�I�I�R�]�]�E��c�t�$�O�E�
�:�:�e�)�/�/�/rc�a�]tRtRtoRtRRlt]R4t]R4t]R4t	RRlt124R	tR125tRt
RtR
tRRltRtVtR#)�_GlobberBaseifzHAbstract class providing shell-style pattern matching and globbing.126    c�6�WnW nW0nW@nR#r1)r�r��
case_pedanticr)�selfr�r�r�rs&&&&&r127�__init__�_GlobberBase.__init__js����,��*��"�rc��\h)z&Implements os.path.lexists().128        ��NotImplementedErrorrws&r129rd�_GlobberBase.lexistsr�130��"�!rc��\h)zELike os.scandir(), but generates (entry, name, path) tuples.131        r�rws&r132rV�_GlobberBase.scandirxr�rc��\h)z'Implements path concatenation.133        r��r�texts&&r134�concat_path�_GlobberBase.concat_path~r�rNc��V'dVPV3MVPp\WVPVP4#r1)r�r�r�r)r�r�r�r�s&&& r135r��_GlobberBase.compile�s1��%+����&�!�������4�+>�+>����O�Orc�Z�V'g
VP#VP4pVP'dVR8XdVPpMZV\9dVP136pMBVP'g%\PV4fVPpMVPpV!W!4#)zReturns a function that selects from a given path, walking and137filtering according to the glob-style pattern parts in *parts*.138ry)�
select_exists�popr�recursive_selector�_special_parts�special_selectorr�rqrp�literal_selector�wildcard_selector)r�r�r��selectors&&  r139r��_GlobberBase.selector�s�����%�%�%��y�y�{���>�>�>�d�d�l��.�.�H�
�^�
#��,�,�H��#�#�#��(:�(:�4�(@�(H��,�,�H��-�-�H���$�$rc�xaaa�V'dSSP,
oSPV4oRVVV3RllpV#)zLReturns a function that selects special children of the given path.140        c�8<�SPVS4pS!W4#r1�r��r�existsr��select_nextr�s&&���r141�select_special�5_GlobberBase.special_selector.<locals>.select_special�s ����#�#�D�$�/�D��t�,�,r�F)r�r�)r�r�r�r�r�sff& @r142r��_GlobberBase.special_selector�s6�����D�H�H��D��m�m�E�*��	-�	-��rc�aaa�V'dI\PVR,4f+SSPVP4,,
oKPV'dSSP,
oSP	V4oRVVV3RllpV#)zHReturns a function that selects a literal descendant of a path.143        c�<<�SPVS4pS!VRR7#)F�r�r�r�s&&���r144�select_literal�5_GlobberBase.literal_selector.<locals>.select_literal�s"����#�#�D�$�/�D��t�E�2�2r�����r�)rqrpr�r�r�)r�r�r�r�r�sff& @r145r��_GlobberBase.literal_selector�sf�����*�*�5��9�5�=��D�H�H�u�y�y�{�*�*�D���D�H�H��D��m�m�E�*��	3�	3��rc�aaaa�VR8XdRMSPV4o\V4oS'dSPV4oRVVVV3RllpV#)zWReturns a function that selects direct children of a given path,146filtering by pattern.147r�Nc3�l<"�S	PV4pVFpwr4pSeS!V4'gKS'dKVP4'gK;S	PTS	P4pS!TRR7Rjx�L148KlVx�Kr	R# \dK�i;iL" \dR#i;i5i)NTr�)rVrWrXr�r�)149rr��entriesr\�150entry_name�151entry_path�dir_onlyrrr�r�s152&&    ����r153�select_wildcard�7_GlobberBase.wildcard_selector.<locals>.select_wildcard�s�����
-��,�,�t�,��6=�1�E�z��}��j�(9�(9�#�)�',�|�|�~�~�$,�(6�*.�)9�)9�*�d�h�h�)O�J�'2�:�d�'K�K�K�",�,�6=��$+�)� (�)��L���
��
�s[�B4�B"�B4�B4�B�,B4�=B �>B4�B�B4�B�B4�"B1�-B4�0B1�1B4r�)r��boolr�)r�r�r�r�r�rrr�sf&& @@@r154r��_GlobberBase.wildcard_selector�sG���155�������d�);����;����-�-��.�K�	-�	-�$�rc�aaaaaa�V'd!VR,R8XdVP4K(SP\JoS'dEV'd=VR,\9d+VSPVP4,,
pKDVR8XdRMSPV4o\
V4oSPV4oRVVV3RllpVVVVV3RloV#)zfReturns a function that selects a given path and all its children,156recursively, filtering by pattern.157ryNc3��<"�\\V44pSeS!\V4V4'dS!W4Rjx�L158V.pV'dS!W24Rjx�L159KR#L#L1605ir1)r��str)rr��	match_pos�stackrrr��select_recursive_steps&&  ���r161�select_recursive�9_GlobberBase.recursive_selector.<locals>.select_recursive�s^�����C��I��I��}��c�$�i�� ;� ;�&�t�4�4�4��F�E��0��B�B�B��5�C�s(�<A'�A#�A'�A'�A%�	A'�%A'c3�162<"�VP4pS
PV4pVF�wrEpRpVPS163R7'dRpT'gS	'dK5\	T4pS	'dS
PTS
P4pSeS!Y�4'd S	'dS!TRR7Rjx�L164MTx�T'gK�TPT4K�	R# \dL�i;iL; \dR#i;i5i)F��follow_symlinksTNr�)r�rVrWrXr�r�r�r�)r�r�rr�r\�_entry_namer�rW�entry_path_strr�r�rrr�r�s&&       �����r165r��>_GlobberBase.recursive_selector.<locals>.select_recursive_step�s������9�9�;�D�
5��,�,�t�,��7>�2�E�166�"�F�� �<�<��<�H�H�%)�F��X�X�),�Z���#�)-�)9�)9�*�d�h�h�)O�J� �=�E�.�,L�,L�'�+6�z�$�+O� O� O�'1� 0�!�6�!�L�L��4�)7>��167#�����!P��#�
��
�so�D�C1�168D�C�D�D�AD�&
D�3C/�4D�D�C,�)D�+C,�,D�1D�<D�?D�Dr�r�)r�r�_no_recurse_symlinksr�r�r�r�r�)	r�r�r�r�r�r�rrr�r�s	f&& @@@@@r169r��_GlobberBase.recursive_selector�s����170��b�	�T�)��I�I�K��.�.�0D�D����E�"�I�^�;�����5�9�9�;�.�.������$�,�,�t�*<����;���m�m�E�*��	C�	C�	5�	5�: �rc#�d"�V'dVx�R#VPV4'dVx�R#R#5i)z-Yields the given path, if it exists.171        N)rd)r�rr�s&&&r172r��_GlobberBase.select_existss*�����J�
�\�\�$�
�
��J� �s�%0�0)r�r�rr�)FFr1r�)�__name__�173__module__�__qualname__�__firstlineno__�__doc__r��staticmethodrdrVr�r�r�r�r�r�r�r��__static_attributes__�__classdictcell__��
__classdict__s@r174r�r�fsu�����#��"��"�175�"��"�176�"��"�P�%�"177��&�<< �|�rr�c�a�]tRtRtoRt]!]PP4t]	Pt]R4tRt
VtR#)�_StringGlobberi!zIProvides shell-style pattern matching and globbing for string paths.178    c��\P!V4;_uu_4p\V4pRRR4RX4# +'giL;i)Nc3�R"�TFqVPVP3x�K	R#5ir1)r.r)r3r\s& r179r5�)_StringGlobber.scandir.<locals>.<genexpr>-s���E�W�E��180�181�E�J�J�/�W���%')rrVr)r�182scandir_itr�s&  r183rV�_StringGlobber.scandir's8���Z�Z��
�
���:�&�G��E�W�E�E��
�s	�<�A	rvN)r�r�r�r�r�r�rrrd�operator�addr�rVr�r�r�s@r184r�r�!s9������2�7�7�?�?�+�G��,�,�K��F��Frr�c�Ta�]tRtRtoRt]R4t]R4t]R4tRt	Vt185R#)�_PathGlobberi0zJProvides shell-style pattern matching and globbing for pathlib paths.186    c�:�VPPRR7#)Fr�)�infor�rws&r187rd�_PathGlobber.lexists4s���y�y�����6�6rc�0�RVP44#)c3�R"�TFqPVPV3x�K	R#5ir1)rr.)r3�childs& r188r5�'_PathGlobber.scandir.<locals>.<genexpr>:s���L�^�E���U�Z�Z��/�^�r)�iterdirrws&r189rV�_PathGlobber.scandir8s��L�T�\�\�^�L�Lrc�D�VP\V4V,4#r1)�
with_segmentsr�r�s&&r190r��_PathGlobber.concat_path<s���!�!�#�d�)�d�"2�3�3rrvN)r�r�r�r�r�r�rdrVr�r�r�r�s@r191r	r	0sH������7��7��M��M��4��4rr	)rrr~r�r�)r�rtz..)T)-r�r_rr�r8�	functoolsrrrir�__all__rrrr&r'rErGrJr%r]r7rLr"r$r#r�rqror!r2rr~r��O_RDONLY�getattrrQ�objectr�r��	lru_cacher�r�r�r	rvrr192�<module>rsr�� ��	�	������193�3��6�t�6�D�6�E�6��6�<*��*�T�*�U�*��*�X'.�Z*�	�G��1941�1951�8� �D�196"�	�	(�+��j�j��#���J�J�z�*���%��197�!���+�+���M�1� =�=���x��4��4�e�4�$�4�n���S�!�0�"�0�x�x�vF�\�F�4�<�4r
codekingpro/portable-devtools · Team Ai