Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3
ÝPfÚ9 ã @ s¤ d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z ddl
mZ dgZej
eƒZejdejƒZejd ejejB ƒZejdd
… ZG dd„ deƒZdS )zu
Class representing the list of files in a distribution.
Equivalent to distutils.filelist, but fixes some problems.
é Né )ÚDistlibException)Úfsdecode)Úconvert_pathÚManifestz\\w*
z#.*?(?=
)|
(?=$)é c @ sz e Zd ZdZddd„Zdd„ Zdd„ Zd d
„ Zddd
„Zdd„ Z dd„ Z
dd„ Zddd„Zd dd„Z
d!dd„Zdd„ ZdS )"r z~A list of files built by on exploring the filesystem and filtered by
applying various patterns to what we find there.
Nc C s> t jjt jj|pt jƒ ƒƒ| _| jt j | _d| _t ƒ | _
dS )zd
Initialise an instance.
:param base: The base directory to explore under.
N)ÚosÚpathÚabspathÚnormpathÚgetcwdÚbaseÚsepÚprefixÚallfilesÚsetÚfiles)Úselfr
© r ú/usr/lib/python3.6/manifest.pyÚ__init__* s zManifest.__init__c C s² ddl m}m}m} g | _}| j}|g}|j}|j}xv|r¬|ƒ }tj |ƒ} x\| D ]T}
tj
j||
ƒ}tj |ƒ}|j}
||
ƒrŒ|jt
|ƒƒ qR||
ƒrR||
ƒ rR||ƒ qRW q8W dS )zmFind all files under the base and set ``allfiles`` to the absolute
pathnames of files found.
r )ÚS_ISREGÚS_ISDIRÚS_ISLNKN)Ústatr r r r r
ÚpopÚappendr Úlistdirr ÚjoinÚst_moder )r r r r r ÚrootÚstackr ÚpushÚnamesÚnameÚfullnamer Úmoder r r Úfindall9 s"
zManifest.findallc C s4 |j | jƒstjj| j|ƒ}| jjtjj|ƒƒ dS )zz
Add a file to the manifest.
:param item: The pathname to add. This can be relative to the base.
N) Ú
startswithr r r r r
r Úaddr )r Úitemr r r r) T s zManifest.addc C s x|D ]}| j |ƒ qW dS )z†
Add a list of files to the manifest.
:param items: The pathnames to add. These can be relative to the base.
N)r) )r Úitemsr* r r r Úadd_many^ s
zManifest.add_manyFc sf ‡ ‡fdd„‰ t ˆjƒ}|rJt ƒ }x|D ]}ˆ |tjj|ƒƒ q(W ||O }dd„ tdd„ |D ƒƒD ƒS )z8
Return sorted files in directory order
c sJ | j |ƒ tjd|ƒ |ˆjkrFtjj|ƒ\}}|dks