Viewing File: /opt/alt/python311/lib64/python3.11/importlib/resources/__pycache__/_legacy.cpython-311.opt-1.pyc



f
ddlZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZddlm
Z
eejefZeZdZdZededed	e	fd
Zededed	efdZe		ddedededed	e
f
dZe		ddedededed	ef
dZeded	eefdZededed	efdZededed	eejfdZdS)N)UnionIterableContextManagerBinaryIOTextIOAny)_commoncFtjfd}|S)Nc\tjjdtd|i|S)Nz is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.)
stacklevel)warningswarn__name__DeprecationWarning)argskwargsfuncs  B/opt/alt/python311/lib64/python3.11/importlib/resources/_legacy.pywrapperzdeprecated.<locals>.wrappersR
}
P
P
P
	
	
	
	
tT$V$$$)	functoolswraps)rrs` r
deprecatedrs8_T%%%%%Nrct|}tj|\}}|rt	|d|S)zNormalize a path by ensuring it is a string.

    If the resulting string contains path separators, an exception is raised.
    z must be only a file name)strospathsplit
ValueError)rstr_pathparent	file_names    rnormalize_pathr%sL4yyH

h//FI
?D===>>>rpackageresourcereturncptj|t|zdS)zDReturn a file-like object opened for binary reading of the resource.rbr
filesr%openr&r's  ropen_binaryr/+s/
M'""^H%=%==CCDIIIrcntj|t|zS)z+Return the binary contents of the resource.)r
r,r%
read_bytesr.s  rread_binaryr21s-
M'""^H%=%==IIKKKrutf-8strictencodingerrorscvtj|t|zd||S)zBReturn a file-like object opened for text reading of the resource.r)r5r6r+)r&r'r5r6s    r	open_textr97s@
M'""^H%=%==CChvDrct||||5}|cdddS#1swxYwYdS)zReturn the decoded string of the resource.

    The decoding-related arguments have the same semantics as those of
    bytes.decode().
    N)r9read)r&r'r5r6fps     r	read_textr=Ds
7Hh	7	72wwyys488cbdtj|DS)zReturn an iterable of entries in `package`.

    Note that not all entries are resources.  Specifically, directories are
    not considered resources.  Use `is_resource()` on each entry returned here
    to check if it is a resource or not.
    cg|]	}|j
S)name).0rs  r
<listcomp>zcontents.<locals>.<listcomp>\sCCC$DICCCr)r
r,iterdir)r&s rcontentsrETs/DC'-"8"8"@"@"B"BCCCCrrAct|tfdtj|DS)zYTrue if `name` is a resource inside `package`.

    Directories are *not* resources.
    c3VK|]#}|jko|V$dS)N)rAis_file)rBtraversabler's  r	<genexpr>zis_resource.<locals>.<genexpr>fsP	H$>)<)<)>)>r)r%anyr
r,rD)r&rAr's  @ris_resourcerL_s`d##H"=1199;;rcntjtj|t|zS)akA context manager providing a file path object to the resource.

    If the resource does not already exist on its own on the file system,
    a temporary file will be created. If the file was created, the file
    will be deleted upon exiting the context manager (no exception is
    raised if the file was deleted prior to the context manager
    exiting).
    )r
as_filer,r%r.s  rrrls+?7=11N84L4LLMMMr)r3r4)rrpathlibtypesrtypingrrrrrrr

ModuleTyperPackageResourcerr%r/bytesr2r9r=rEboolrLPathrr@rr<module>rYs				IIIIIIIIIIIIIIII
 #%
&


JJHJJJJJ
LLHLLLLL
			
			
		
					

	
	DgD(3-DDDD							N
NNGL!NNNNNNr
Back to Directory File Manager