python (3.12.0)

(root)/
lib/
python3.12/
importlib/
resources/
__pycache__/
readers.cpython-312.pyc

̑eddlZddlZddlZddlZddlZddlmZddlmZdZ	GddejZGdd	ejZGd
dejZGdd
ejZy)N)abc)onlycRttjj|SN)itercollectionsOrderedDictfromkeys)itemss O/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/importlib/resources/readers.pyremove_duplicatesrs''00788ceZdZdZdZdZy)
FileReaderc`tj|jj|_yr)pathlibPathpathparent)selfloaders  r
__init__zFileReader.__init__sLL-44	rcJt|jj|Sz{
        Return the file system path to prevent
        `resources.path()` from creating a temporary
        copy.
        strrjoinpathrresources  r

resource_pathzFileReader.resource_path499%%h/00rc|jSrrrs r
fileszFileReader.filesyyrN__name__
__module____qualname__rr!r&rr
rrs51rrc0eZdZdZfdZdZdZxZS)	ZipReaderc|jd\}}}|jjdd|zdz|_|j|_y)N.\/)
rpartitionprefixreplacearchive)rrmodule_names     r
rzZipReader.__init__!sE&&s+
1dmm++D#6=C~~rcv	t||S#t$r}t|jdd}~wwxYwNr)super
open_resourceKeyErrorFileNotFoundErrorargs)rr exc	__class__s   r
r=zZipReader.open_resource&s;	17(22	1#CHHQK00	1s	838c|jj|}|jxr|jS)zf
        Workaround for `zipfile.Path.is_file` returning true
        for non-existent paths.
        )r&ris_fileexists)rrtargets   r
is_resourcezZipReader.is_resource,s2
&&t,~~3FMMO3rcVtj|j|jSr)zipfilerr6r4r%s r
r&zZipReader.files4s||DLL$++66r)r)r*r+rr=rGr&
__classcell__rBs@r
r.r. s&
147rr.creZdZdZdZdZdZdZdZdZ	fdZ
ed	Zd
Z
edZdZxZS)
MultiplexedPathz
    Given a series of Traversable objects, implement a merged
    version of the interface across all objects. Useful for
    namespace packages which may be multihomed at a single
    name.
    ctttjt	||_|j
s
d}t
|td|j
Dstdy)Nz.MultiplexedPath must contain at least one pathc3<K|]}|jywr)is_dir.0rs  r
	<genexpr>z+MultiplexedPath.__init__.<locals>.<genexpr>Es9T4;;=9sz)MultiplexedPath only supports directories)	listmaprrr_pathsr?allNotADirectoryError)rpathsmessages   r
rzMultiplexedPath.__init__@sY3w||->u-EFG{{FG#G,,9T[[99$%PQQ:rcd|jD}tjd}tjt|||}t
|jd|DS)Nc3JK|]}|jD]}|ywr)iterdir)rRrchilds   r
rSz*MultiplexedPath.iterdir.<locals>.<genexpr>Is"Ndt||~NeENENs!#r9)keyc3&K|]	\}}|ywrr,)rRr9locss   r
rSz*MultiplexedPath.iterdir.<locals>.<genexpr>Ls!@:4$!@s)rVoperator
attrgetter	itertoolsgroupbysortedrU_follow)rchildrenby_namegroupss    r
r]zMultiplexedPath.iterdirHsPNdkkN%%f-""6(#@gN4<<!@!@AArct|dNz is not a filer?r%s r

read_byteszMultiplexedPath.read_bytesN4& 788rct|drlrmrr@kwargss   r
	read_textzMultiplexedPath.read_textQrorcy)NTr,r%s r
rPzMultiplexedPath.is_dirTsrcy)NFr,r%s r
rDzMultiplexedPath.is_fileWsrc	t||S#tj$r|jdj|cYSwxYwr;)r<rrTraversalErrorrV)rdescendantsrBs  r
rzMultiplexedPath.joinpathZsJ	97#[11!!	9+4;;q>**K88	9s/AActj|d\}}}	t|S#t$r%	||cYS#t$rt|cYcYSwxYwwxYw)z
        Construct a MultiplexedPath if needed.

        If children contains a sole element, return it.
        Otherwise, return a MultiplexedPath of the items.
        Unless one of the items is not a Directory, then return the first.
        )rdteer
ValueErrorrXnext)clsrhsubdirsone_dirone_files     r
rgzMultiplexedPath._followbsa&/]]8Q%?"(	&= 	&
&G}$%
&H~%
&	&s)
'	A8AAAAAct|drlrmrqs   r
openzMultiplexedPath.openurorc4|jdjSr;)rVr9r%s r
r9zMultiplexedPath.namexs{{1~"""rcRdjd|jD}d|dS)Nz, c3(K|]
}d|dyw)'Nr,rQs  r
rSz+MultiplexedPath.__repr__.<locals>.<genexpr>}s>$AdV1+>szMultiplexedPath())joinrV)rrYs  r
__repr__zMultiplexedPath.__repr__|s)		>$++>>!%**r)r)r*r+__doc__rr]rnrsrPrDrclassmethodrgrpropertyr9rrJrKs@r
rMrM8s_RB999&&$9##+rrMceZdZdZdZdZy)NamespaceReaderc`dt|vrtdtt||_y)N
NamespacePathzInvalid path)rr|rMrTr)rnamespace_paths  r
rzNamespaceReader.__init__s+#n"55^,,#T.%9:	rcJt|jj|Srrrs  r
r!zNamespaceReader.resource_pathr"rc|jSrr$r%s r
r&zNamespaceReader.filesr'rNr(r,rr
rrs;
1rr)r	rdrrbrIr
_itertoolsrrTraversableResourcesrr.TraversablerMrr,rr
<module>rsh9
))
 7((70F+cooF+Rc..r