Your IP : 216.73.216.86


Current Path : /var/opt/nydus/ops/importlib_resources/__pycache__/
Upload File :
Current File : //var/opt/nydus/ops/importlib_resources/__pycache__/_functional.cpython-312.pyc

�

=Ui�
���dZddlZddlmZmZddlmZe�Zd�Z	edd�d	�Z
d
�Zedd�d�Zd�Z
d
�Zd�Zd�Zd�Zy)z5Simplified function-based API for importlib.resources�N�)�as_file�files)�TraversalErrorc�8�t||�jd�S)z8Open for binary reading the *resource* within *package*.�rb)�
_get_resource�open��anchor�
path_namess  �P/opt/nydus/tmp/pip-target-b52u9j4x/lib/python/importlib_resources/_functional.py�open_binaryrs�����,�1�1�$�7�7��strict��encoding�errorsc�Z�t||�}t||�}|jd||��S)z6Open for text reading the *resource* within *package*.�rr)�_get_encoding_argr	r
�rrrr
�resources     r�	open_textrs/�� ��X�6�H��V�Z�0�H��=�=��x��=�?�?rc�6�t||�j�S)zARead and return contents of *resource* within *package* as bytes.)r	�
read_bytesrs  r�read_binaryrs�����,�7�7�9�9rc�X�t||�}t||�}|j||��S)z?Read and return contents of *resource* within *package* as str.r)rr	�	read_textrs     rrrs0�� ��X�6�H��V�Z�0�H����x���?�?rc�,�tt||��S)z@Return the path to the *resource* as an actual file system path.)rr	rs  r�pathr!#s���=���4�5�5rc�V�	t||�j�S#t$rYywxYw)zjReturn ``True`` if there is a resource named *name* in the package,

    Otherwise returns ``False``.
    F)r	�is_filerrs  r�is_resourcer$(s/��
��V�Z�0�8�8�:�:������s��	(�(c�|�tjdtd��d�t||�j	�D�S)z�Return an iterable over the named resources within the package.

    The iterable returns :class:`str` resources (e.g. files).
    The iterable does not recurse into subdirectories.
    zPimportlib.resources.contents is deprecated. Use files(anchor).iterdir() instead.r)�
stacklevelc3�4K�|]}|j���y�w)N)�name)�.0rs  r�	<genexpr>zcontents.<locals>.<genexpr>?s����V�*U�h�H�M�M�*U�s�)�warnings�warn�DeprecationWarningr	�iterdirrs  r�contentsr/3s9��
�M�M�	/���	�W�-��
�*K�*S�*S�*U�V�Vrc�J�|turt|�dkDrtd��y|S)Nrz5'encoding' argument required with multiple path nameszutf-8)�_MISSING�len�	TypeError)r
rs  rrrBs2��
�8���z�?�Q���G��
���Orc�L�|�td��t|�j|�S)Nz)anchor must be module or string, got None)r3r�joinpathrs  rr	r	Qs*��
�~��C�D�D�!�5��=�!�!�:�.�.r)�__doc__r+�_commonrr�abcr�objectr1rrrrr!r$r/rr	�rr�<module>r;sV��;��#���8��8�
-5�X�@�:�
-5�X�@�6�
�W��/r