관리-도구
편집 파일: zipp.cpython-311.pyc
� ���j�&r&����������������������������d�dl�Z�d�dlZd�dlZd�dlZd�dlZd�dlZd�dlZej��������dk�����rd�dlm Z �ne Z dgZd��Zd��Z e j��������Z �d��Z�G�d��d ej��������������������Z�G�d ��de������������Zd��Z�G�d ��d������������ZdS�)�����N)��������)�OrderedDict�Pathc������������������H�����t����������j��������t����������|�������������dd������������S�)a2�� Given a path with elements separated by posixpath.sep, generate all parents of that path. >>> list(_parents('b/d')) ['b'] >>> list(_parents('/b/d/')) ['/b'] >>> list(_parents('b/d/f/')) ['b/d', 'b'] >>> list(_parents('b')) [] >>> list(_parents('')) [] ����N)� itertools�islice� _ancestry��paths��� �z/builddir/build/BUILD/imunify360-venv-2.5.2/opt/imunify360/venv/lib/python3.11/site-packages/pkg_resources/_vendor/zipp.py�_parentsr������s������ ���I�d�O�O�Q��5�5�5�����c��������������#��������K����|�����������������������t����������j��������������������}�|�r?|�t����������j��������k����r3|�V���t����������j��������|�������������\��}�}|�r|�t����������j��������k�����-dS�dS�dS�dS�)aR�� Given a path with elements separated by posixpath.sep, generate all elements of that path >>> list(_ancestry('b/d')) ['b/d', 'b'] >>> list(_ancestry('/b/d/')) ['/b/d', '/b'] >>> list(_ancestry('b/d/f/')) ['b/d/f', 'b/d', 'b'] >>> list(_ancestry('b')) ['b'] >>> list(_ancestry('')) [] N)�rstrip� posixpath�sep�split)r ����tails��� r���r���r���%���s����������� ��;�;�y�}�%�%�D� ��+�4�9�=�(�(�� � � ��_�T�*�*� ��d����+�4�9�=�(�(�(�(��+��+��+��+�(�(r���c������������������P�����t����������j��������t����������|������������j��������|�������������S�)zZ Return items in minuend not in subtrahend, retaining order with O(1) lookup. )r ����filterfalse�set�__contains__)�minuend� subtrahends��� r����_differencer���?���s ������ �� ��Z���!=�w�G�G�Gr���c��������������������Z�������e�Zd�ZdZed����������������Z��fd�Zd��Zd��Ze d����������������Z ��xZS�)�CompleteDirszk A ZipFile subclass that ensures that implied directories are always included in the namelist. c�����������������������t�����������j�����������������������������t����������t����������|�������������������������}d��|D���������������}t����������t ����������||�������������������������S�)Nc��������������3����4���K����|�]}|t�����������j��������z���V����d�S��N)r���r���)�.0�ps��� r���� <genexpr>z-CompleteDirs._implied_dirs.<locals>.<genexpr>P���s)����������6�6��1�y�}�$�6�6�6�6�6�6r���)r ����chain� from_iterable�mapr����_deduper���)�names�parents�as_dirss��� r���� _implied_dirszCompleteDirs._implied_dirsM���sL�������/�/�/��H�e�0D�0D�E�E��6�6�g�6�6�6���{�7�E�2�2�3�3�3r���c������������������������t����������t����������|������������������������������������������������}|t����������|����������������������|������������������������z���S�r"���)�superr����namelist�listr-���)�selfr*���� __class__s��� �r���r0���zCompleteDirs.namelistS���s?��������l�D�)�)�2�2�4�4���t�D�.�.�u�5�5�6�6�6�6r���c������������������D�����t����������|������������������������������������������������S�r"���)r���r0����r2���s��� r���� _name_setzCompleteDirs._name_setW���s�������4�=�=�?�?�#�#�#r���c������������������P�����|�������������������������������������}|dz���}||vo||v�}|r|n|S�)zx If the name represents a directory, return that name as a directory (with the trailing slash). �/)r6���)r2����namer*����dirname� dir_matchs��� r����resolve_dirzCompleteDirs.resolve_dirZ���s?������ ���� � ����*����%�:�'�U�*:� �#�-�w�w��-r���c������������������������t����������|t����������������������r|S�t����������|t����������j��������������������s�|�t ����������|������������������������S�d|j��������vrt����������}�|�|_��������|S�)zl Given a source (filename or zipfile), return an appropriate CompleteDirs subclass. �r)� isinstancer����zipfile�ZipFile�_pathlib_compat�moder3���)�cls�sources��� r����makezCompleteDirs.maked���sh��������f�l�+�+�� ��M��&�'�/�2�2�� 0��3��v�.�.�/�/�/���f�k�!�!��C����� r���)�__name__� __module__�__qualname__�__doc__�staticmethodr-���r0���r6���r<����classmethodrF���� __classcell__�r3���s���@r���r���r���G���s������������������� ��4��4���\�4� 7��7��7��7��7�$��$��$�.��.��.��������[���������r���r���c��������������������,�������e�Zd�ZdZ��fd�Z��fd�Z��xZS�)� FastLookupzV ZipFile subclass to ensure implicit dirs exist and are resolved rapidly. c�������������������������t����������j��������t����������������������5��|�j��������cd�d�d��������������S�#�1�swxY�w�Y���t ����������t ����������|������������������������������������������������|�_��������|�j��������S�r"���)� contextlib�suppress�AttributeError�_FastLookup__namesr/���rP���r0����r2���r3���s��� �r���r0���zFastLookup.namelist~���s�������� � �� 0� 0�� �� ��<� �� �� �� �� �� �� �� �� �� �� �� ����� �� �� �� ��Z��.�.�7�7�9�9����|������/�3�3c�������������������������t����������j��������t����������������������5��|�j��������cd�d�d��������������S�#�1�swxY�w�Y���t ����������t ����������|������������������������������������������������|�_��������|�j��������S�r"���)rR���rS���rT����_FastLookup__lookupr/���rP���r6���rV���s��� �r���r6���zFastLookup._name_set����s�������� � �� 0� 0�� !�� !��=� !�� !�� !�� !�� !�� !�� !�� !�� !�� !�� !�� !����� !�� !�� !�� !��j�$�/�/�9�9�;�;�� ��}�rW���)rG���rH���rI���rJ���r0���r6���rM���rN���s���@r���rP���rP���x���s[������������������ �������������������������r���rP���c������������������j����� �|�������������������������������������S�#�t����������$�r�t����������|�������������cY�S�w�xY�w)zi For path-like objects, convert to a filename for compatibility on Python 3.6.1 and earlier. )� __fspath__rT����strr���s��� r���rB���rB�������sD������ ���� � � ����������4�y�y�������s������2�2c�������������������������e�Zd�ZdZdZdd�Zddd�d�Zed ����������������Zed ����������������Z ed����������������Z ed����������������Zed ����������������Zd��Z d��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��ZeZed����������������ZdS�)r���u4�� A pathlib-compatible interface for zip files. Consider a zip file with this structure:: . ├── a.txt └── b ├── c.txt └── d └── e.txt >>> data = io.BytesIO() >>> zf = zipfile.ZipFile(data, 'w') >>> zf.writestr('a.txt', 'content of a') >>> zf.writestr('b/c.txt', 'content of c') >>> zf.writestr('b/d/e.txt', 'content of e') >>> zf.filename = 'mem/abcde.zip' Path accepts the zipfile object itself or a filename >>> root = Path(zf) From there, several path operations are available. Directory iteration (including the zip file itself): >>> a, b = root.iterdir() >>> a Path('mem/abcde.zip', 'a.txt') >>> b Path('mem/abcde.zip', 'b/') name property: >>> b.name 'b' join with divide operator: >>> c = b / 'c.txt' >>> c Path('mem/abcde.zip', 'b/c.txt') >>> c.name 'c.txt' Read text: >>> c.read_text() 'content of c' existence: >>> c.exists() True >>> (b / 'missing.txt').exists() False Coercion to string: >>> import os >>> str(c).replace(os.sep, posixpath.sep) 'mem/abcde.zip/b/c.txt' At the root, ``name``, ``filename``, and ``parent`` resolve to the zipfile. Note these attributes are not valid and will raise a ``ValueError`` if the zipfile has no filename. >>> root.name 'abcde.zip' >>> str(root.filename).replace(os.sep, posixpath.sep) 'mem/abcde.zip' >>> str(root.parent) 'mem' z>{self.__class__.__name__}({self.root.filename!r}, {self.at!r})��c������������������R�����t��������������������������������|������������|�_��������||�_��������dS�)aX�� Construct a Path from a ZipFile or filename. Note: When the source is an existing ZipFile object, its type (__class__) will be mutated to a specialized type. If the caller wishes to retain the original type, the caller should either create a separate ZipFile object or pass a filename. N)rP���rF����root�at)r2���r`���ra���s��� r����__init__z Path.__init__����s"��������O�O�D�)�)�� �����r���r>���N��pwdc�����������������J����|�������������������������������������rt����������|��������������|d���������}|������������������������������������s|dk����rt����������|��������������|�j�����������������������������|�j��������||�������������}d|v�r|s|rt����������d�������������|S�t����������j ��������|g|�R�i�|��S�)z� Open this entry as text or binary following the semantics of ``pathlib.Path.open()`` by passing arguments through to io.TextIOWrapper(). r���r>���rc����bz*encoding args invalid for binary operation) �is_dir�IsADirectoryError�exists�FileNotFoundErrorr`����openra���� ValueError�io� TextIOWrapper)r2���rC���rd����args�kwargs�zip_mode�streams��� r���rk���z Path.open����s���������;�;�=�=�� *�#�D�)�)�)���7���{�{�}�}�� *��S���#�D�)�)�)��������s��;�;���$�;�;��� O�v�� O� �!M�N�N�N��M����8��8�8�8��8�8�8r���c������������������V�����t����������j��������|�j��������������������j��������p|�j��������j��������S�r"���)�pathlibr���ra���r9����filenamer5���s��� r���r9���z Path.name���!�������|�D�G�$�$�)�?�T�]�-?�?r���c������������������V�����t����������j��������|�j��������������������j��������p|�j��������j��������S�r"���)rt���r���ra����suffixru���r5���s��� r���rx���zPath.suffix ��s!�������|�D�G�$�$�+�C�t�}�/C�Cr���c������������������V�����t����������j��������|�j��������������������j��������p|�j��������j��������S�r"���)rt���r���ra����suffixesru���r5���s��� r���rz���z Path.suffixes ��s!�������|�D�G�$�$�-�G���1G�Gr���c������������������V�����t����������j��������|�j��������������������j��������p|�j��������j��������S�r"���)rt���r���ra����stemru���r5���s��� r���r|���z Path.stem��rv���r���c������������������n�����t����������j��������|�j��������j�����������������������������������������|�j��������������������S�r"���)rt���r���r`���ru����joinpathra���r5���s��� r���ru���z Path.filename��s'�������|�D�I�.�/�/�8�8���A�A�Ar���c������������������������|�j���������dg|�R�i�|��5�}|�����������������������������������cd�d�d��������������S�#�1�swxY�w�Y���d�S�)Nr>����rk����read)r2���ro���rp����strms��� r���� read_textzPath.read_text��s������� �T�Y�s� ,�T� ,� ,� ,�V� ,� ,�� ���9�9�;�;� �� �� �� �� �� �� �� �� �� �� �� ����� �� �� �� �� �� s����3�7�7c�����������������������|�����������������������d������������5�}|�����������������������������������cd�d�d��������������S�#�1�swxY�w�Y���d�S�)N�rbr����)r2���r����s��� r���� read_byteszPath.read_bytes��s~������ �Y�Y�t�_�_�� ���9�9�;�;� �� �� �� �� �� �� �� �� �� �� �� ����� �� �� �� �� �� s����7�;�;c�����������������������t����������j��������|j�����������������������������d������������������������|�j�����������������������������d������������k����S��Nr8���)r���r:���ra���r���)r2���r ���s��� r���� _is_childzPath._is_child!��s4������� ������!4�!4�5�5������9L�9L�L�Lr���c������������������8�����|�����������������������|�j��������|������������S�r"���)r3���r`���)r2���ra���s��� r����_nextz Path._next$��s�������~�~�d�i��,�,�,r���c������������������F�����|�j����������p|�j������������������������������d������������S�r����)ra����endswithr5���s��� r���rg���zPath.is_dir'��s!�������7�{�3�d�g�.�.�s�3�3�3r���c������������������T�����|�������������������������������������o|�������������������������������������S�r"���)ri���rg���r5���s��� r����is_filezPath.is_file*��s �������{�{�}�}�2�T�[�[�]�]�!2�2r���c������������������B�����|�j���������|�j�������������������������������������������v�S�r"���)ra���r`���r6���r5���s��� r���ri���zPath.exists-��s�������w�$�)�-�-�/�/�/�/r���c������������������������|�������������������������������������st����������d�������������t����������|�j��������|�j�������������������������������������������������������}t ����������|�j��������|������������S�)NzCan't listdir a file)rg���rl���r(���r����r`���r0����filterr����)r2����subss��� r����iterdirzPath.iterdir0��sR�������{�{�}�}�� 5��3�4�4�4��4�:�t�y�1�1�3�3�4�4���d�n�d�+�+�+r���c������������������J�����t����������j��������|�j��������j��������|�j��������������������S�r"���)r����joinr`���ru���ra���r5���s��� r����__str__zPath.__str__6��s�������~�d�i�0�$�'�:�:�:r���c������������������8�����|�j������������������������������|��������������S�)Nr5���)�_Path__repr�formatr5���s��� r����__repr__z Path.__repr__9��s�������{�!�!�t�!�,�,�,r���c�����������������������t����������j��������|�j��������gt����������t����������|�������������R���}|����������������������|�j�����������������������������|������������������������S�r"���)r���r����ra���r(���rB���r����r`���r<���)r2����other�nexts��� r���r~���z Path.joinpath<��sG�������~�d�g�D��O�U�(C�(C�D�D�D���z�z�$�)�/�/��5�5�6�6�6r���c�����������������������|�j���������s|�j��������j��������S�t����������j��������|�j������������������������������d������������������������}|r|dz ��}|����������������������|������������S�r����)ra���ru����parentr���r:���r���r����)r2���� parent_ats��� r���r����zPath.parentB��sY�������w�� (��=�'�'��%�d�g�n�n�S�&9�&9�:�:� ��� ����I��z�z�)�$�$�$r���)r^���)r>���)rG���rH���rI���rJ���r����rb���rk����propertyr9���rx���rz���r|���ru���r����r����r����r����rg���r����ri���r����r����r����r~����__truediv__r������r���r���r���r�������s��������������K��K�Z�N�F��������9���9��9��9��9��9�$��@��@���X�@���D��D���X�D���H��H���X�H���@��@���X�@���B��B���X�B�����������M��M��M�-��-��-�4��4��4�3��3��3�0��0��0�,��,��,�;��;��;�-��-��-�7��7��7���K� �%��%���X�%��%��%r���)rm���r���r@���r ���rR����sysrt����version_info�collectionsr����dict�__all__r���r����fromkeysr)���r���rA���r���rP���rB���r���r����r���r����<module>r�������s]����� � � � ������������������������������� � � � ��������f���'�'�'�'�'�'�'��K���(��6��6��6�&+��+��+�,�� ���/�H��H��H�.��.��.��.��.�7�?��.��.��.�b����������������&�����s%��s%��s%��s%��s%��s%��s%��s%��s%��s%r���