/usr/lib/python3/dist-packages/twisted/python/__pycache__
Edit: /usr/lib/python3/dist-packages/twisted/python/__pycache__/zippath.cpython-310.pyc (9146B)
o
bD# @ s d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z ddl
mZmZ ddl
mZmZmZmZmZ dZee eG d d
d
eZG dd deZdd
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 @ s e Zd ZdZdd Zdd ZdefddZed d
Z dd Z
d
d Zdd Zdd Z
dd Zdd Zdd Zdd Zdd Zdd Zdd 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.
c C sF || _ || _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)selfr r separchiveFilename r 8/usr/lib/python3/dist-packages/twisted/python/zippath.py__init__( s
"zZipPath.__init__c C s( t |tstS t| j| jf|j|jfS N)
isinstancer
NotImplementedr r r )r otherr r r __cmp__; s
zZipPath.__cmp__returnc C sN t | jtj| jjg}|| j| j t | jtj}d| |dS )NzZipPath())
r r r r abspathr extendr r r )r partsossepr r r __repr__B s
zZipPath.__repr__c C s t | jtS )z
Return a zip directory separator.
@return: The zip directory separator.
@returntype: The same type as C{self.path}.
)r r r r r r r r J s zZipPath.sepc C s<