/usr/lib/python3/dist-packages/twisted/python/__pycache__
NameSizeModeActions
compat.cpython-310.pyc153980644editdlrm
components.cpython-310.pyc143640644editdlrm
constants.cpython-310.pyc4680644editdlrm
context.cpython-310.pyc46570644editdlrm
deprecate.cpython-310.pyc252210644editdlrm
failure.cpython-310.pyc189600644editdlrm
fakepwd.cpython-310.pyc72920644editdlrm
filepath.cpython-310.pyc520500644editdlrm
formmethod.cpython-310.pyc127170644editdlrm
htmlizer.cpython-310.pyc35820644editdlrm
lockfile.cpython-310.pyc51380644editdlrm
log.cpython-310.pyc230160644editdlrm
logfile.cpython-310.pyc104590644editdlrm
modules.cpython-310.pyc254690644editdlrm
monkey.cpython-310.pyc23150644editdlrm
procutils.cpython-310.pyc13890644editdlrm
randbytes.cpython-310.pyc37350644editdlrm
rebuild.cpython-310.pyc55780644editdlrm
reflect.cpython-310.pyc191270644editdlrm
release.cpython-310.pyc15250644editdlrm
roots.cpython-310.pyc89330644editdlrm
runtime.cpython-310.pyc56170644editdlrm
sendmsg.cpython-310.pyc25800644editdlrm
shortcut.cpython-310.pyc24640644editdlrm
syslog.cpython-310.pyc33680644editdlrm
systemd.cpython-310.pyc30510644editdlrm
text.cpython-310.pyc42690644editdlrm
threadable.cpython-310.pyc35200644editdlrm
threadpool.cpython-310.pyc105020644editdlrm
url.cpython-310.pyc2790644editdlrm
urlpath.cpython-310.pyc92820644editdlrm
usage.cpython-310.pyc286350644editdlrm
util.cpython-310.pyc279390644editdlrm
versions.cpython-310.pyc3560644editdlrm
win32.cpython-310.pyc48410644editdlrm
zippath.cpython-310.pyc91460644editdlrm
zipstream.cpython-310.pyc88260644editdlrm
_appdirs.cpython-310.pyc8620644editdlrm
_inotify.cpython-310.pyc25800644editdlrm
_pydoctor.cpython-310.pyc57500644editdlrm
_release.cpython-310.pyc181330644editdlrm
_shellcomp.cpython-310.pyc188550644editdlrm
_textattributes.cpython-310.pyc106420644editdlrm
_tzhelper.cpython-310.pyc33850644editdlrm
_url.cpython-310.pyc2690644editdlrm
__init__.cpython-310.pyc5460644editdlrm
Edit: /usr/lib/python3/dist-packages/twisted/python/__pycache__/zippath.cpython-310.pyc (9146B)
o bD#@sdZddlZddlZddlZddlmZddlmZddlm Z ddl m Z m Z ddl mZmZmZmZmZdZe e eGd d d eZGd d d eZd d gZdS) zt This module contains implementations of L{IFilePath} for zip files. See the constructor of L{ZipArchive} for use. N)Dict)ZipFile) implementer)cmp comparable)AbstractFilePathFilePath IFilePathUnlistableError_coerceToFilesystemEncoding/c@seZdZdZddZddZdefddZed d Z d d Z d dZ ddZ ddZ ddZddZddZddZddZddZdd Zd/d"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.S)0ZipPathzF I represent a file or directory contained within a zip file. cCsF||_||_t|t}t||jj}tjj|g|j |R|_dS)z Don't construct me directly. Use C{ZipArchive.child()}. @param archive: a L{ZipArchive} instance. @param pathInArchive: a ZIP_PATH_SEP-separated string. N) archive pathInArchiver ZIP_PATH_SEPzipfilefilenameospathjoinsplit)selfrrseparchiveFilenamer8/usr/lib/python3/dist-packages/twisted/python/zippath.py__init__(s "zZipPath.__init__cCs(t|tstSt|j|jf|j|jfSN) isinstancer NotImplementedrrr)rotherrrr__cmp__;s zZipPath.__cmp__returncCsNt|jtj|jjg}||j|jt|jtj}d| |dS)NzZipPath()) r rrrabspathrextendrrr)rpartsosseprrr__repr__Bs zZipPath.__repr__cCs t|jtS)z Return a zip directory separator. @return: The zip directory separator. @returntype: The same type as C{self.path}. )r rrrrrrrJs z ZipPath.sepcCs<|j|j}t|dkr|jSt|j|j|ddS)N)rrrlenrr r)rsplituprrrparentTs zZipPath.parentcCs,t|t}t||j}t|j|||gS)a& Return a new ZipPath representing a path in C{self.archive} which is a child of this path. @note: Requesting the C{".."} (or other special name) child will not cause L{InsecurePath} to be raised since these names do not have any special meaning inside a zip archive. Be particularly careful with the C{path} attribute (if you absolutely must use it) as this means it may include special names with special meaning outside of the context of a zip archive. )r rrr rr)rrjoinerrrrrchildZs z ZipPath.childcCs||Sr)r.r0rrrrrsiblingjzZipPath.siblingcCs|p|Sr)isdirisfiler)rrrexistsmzZipPath.existscCs|j|jjvSr)rrchildmapr)rrrr4pr3z ZipPath.isdircCs|j|jjjvSr)rrr NameToInfor)rrrr5sr7zZipPath.isfilecCsdS)NFrr)rrrislinkvzZipPath.islinkcCsF|r|rt|jj|jSttt j dttt j d)NzLeaf zip entry listedzNon-existent zip entry listed) r6r4listrr8rkeysr OSErrorerrnoENOTDIRENOENTr)rrrlistdirys zZipPath.listdircCstj|jS)zQ Return a value similar to that returned by C{os.path.splitext}. )rrsplitextr)rrrrCszZipPath.splitextcCs|j|jdS)Nr+)rrrr)rrrbasenameszZipPath.basenamecCs |jSr)r.rr)rrrdirnames zZipPath.dirnamercCstd|j}|jjj||dS)N)mode)r rrropen)rrHrrrrrIs z ZipPath.opencCsdSrrr)rrrchangedr;zZipPath.changedcCstd|j}|jjj|jS)zR Retrieve this file's size. @return: file size, in bytes rG)r rrrr9 file_sizerrrrrgetsizes zZipPath.getsizecCs |jS)z Retrieve this file's last access-time. This is the same as the last access time for the archive. @return: a number of seconds since the epoch )r getAccessTimer)rrrrN zZipPath.getAccessTimecCs&td|j}t|jjj|jdS)z Retrieve this file's last modification time. This is the time of modification recorded in the zipfile. @return: a number of seconds since the epoch. rG)rrr)r rtimemktimerrr9 date_timerLrrrgetModificationTimes zZipPath.getModificationTimecCs|S)z Retrieve this file's last modification time. This name is provided for compatibility, and returns the same value as getmtime. @return: a number of seconds since the epoch. )rSr)rrrgetStatusChangeTimeszZipPath.getStatusChangeTimeN)rF)__name__ __module__ __qualname____doc__rr!strr(propertyrr.r0r2r6r4r5r:rBrCrDrErIrJrMrNrSrTrrrrr !s0       r c@sZeZdZdZeddZddZddZdd Zd d Z d d Z ddZ de fddZ dS) ZipArchivea I am a L{FilePath}-like object which can wrap a zip archive as if it were a directory. It works similarly to L{FilePath} in L{bytes} and L{unicode} handling -- instantiating with a L{bytes} will return a "bytes mode" L{ZipArchive}, and instantiating with a L{unicode} will return a "text mode" L{ZipArchive}. Methods that return new L{ZipArchive} or L{ZipPath} instances will be in the mode of the argument to the creator method, converting if required. cCs|Srrr)rrrrszZipArchive.archivecCs||_ttd||_t|d|_i|_|jD];}t|j||j}t t |D]#}|| }|j |d| }||jvrGi|j|<d|j||<q+t|d}qdS)z Create a ZipArchive, treating the archive at archivePathname as a zip file. @param archivePathname: a L{bytes} or L{unicode}, naming a path in the filesystem. rGNr*) rrr rrr8namelistrrranger,r)rarchivePathnamenamexr0r.rrrrs     zZipArchive.__init__cCs t||S)z Create a ZipPath pointing at a path within the archive. @param path: a L{bytes} or L{unicode} with no path separators in it (either '/' or the system path separator, if it's different). )r r1rrrr0rOzZipArchive.childcCt|jjS)zC Returns C{True} if the underlying archive exists. )rrrr6r)rrrr6zZipArchive.existscCra)z= Return the archive file's last access time. )rrrrNr)rrrrNrbzZipArchive.getAccessTimecCra)z> Return the archive file's modification time. )rrrrSr)rrrrSrbzZipArchive.getModificationTimecCra)z? Return the archive file's status change time. )rrrrTr)rrrrT rbzZipArchive.getStatusChangeTimer"cCsdtj|jdS)Nz ZipArchive(r#)rrr$r)rrrr(szZipArchive.__repr__N)rUrVrWrXrZrrr0r6rNrSrTrYr(rrrrr[s  r[)rXr?rrPtypingrrrzope.interfacertwisted.python.compatrrtwisted.python.filepathrrr r r rr r[__all__rrrrs    " O