class documentation

class twisted.python.zippath.ZipArchive(ZipPath): (source)

View In Hierarchy

I am a FilePath-like object which can wrap a zip archive as if it were a directory.

It works similarly to FilePath in bytes and unicode handling -- instantiating with a bytes will return a "bytes mode" ZipArchive, and instantiating with a unicode will return a "text mode" ZipArchive. Methods that return new ZipArchive or ZipPath instances will be in the mode of the argument to the creator method, converting if required.

Property archive Undocumented
Method __init__ Create a ZipArchive, treating the archive at archivePathname as a zip file.
Instance Variable path Undocumented
Instance Variable zipfile Undocumented
Instance Variable pathInArchive Undocumented
Instance Variable childmap Undocumented
Method child Create a ZipPath pointing at a path within the archive.
Method exists Returns True if the underlying archive exists.
Method getAccessTime Return the archive file's last access time.
Method getModificationTime Return the archive file's modification time.
Method getStatusChangeTime Return the archive file's status change time.
Method __repr__ Undocumented

Inherited from ZipPath:

Method __cmp__ Undocumented
Property sep Return a zip directory separator.
Method parent A file path for the directory containing the file at this file path.
Method sibling Return a FilePath with the same directory as this instance but with a basename of path.
Method isdir Check if this file path refers to a directory.
Method isfile Check if this file path refers to a regular file.
Method islink Undocumented
Method listdir Undocumented
Method splitext Return a value similar to that returned by os.path.splitext.
Method basename Retrieve the final component of the file path's path (everything after the final path separator).
Method dirname Undocumented
Method open Opens this file path with the given mode.
Method changed Clear any cached information about the state of this path on disk.
Method getsize Retrieve this file's size.

Inherited from AbstractFilePath (via ZipPath):

Method getContent Retrieve the contents of the file at this path.
Method parents Retrieve an iterator of all the ancestors of this path.
Method children List the children of this path object.
Method walk Yield myself, then each of my children, and each of those children's children in turn.
Method descendant Retrieve a child or child's child of this path.
Method segmentsFrom Return a list of segments between a child and its ancestor.
Method __hash__ Hash the same as another FilePath with the same path as mine.
Method getmtime Deprecated. Use getModificationTime instead.
Method getatime Deprecated. Use getAccessTime instead.
Method getctime Deprecated. Use getStatusChangeTime instead.
@property
archive = (source)
def __init__(self, archivePathname): (source)

Create a ZipArchive, treating the archive at archivePathname as a zip file.

ParametersarchivePathnamea bytes or unicode, naming a path in the filesystem.
zipfile = (source)

Undocumented

pathInArchive = (source)
childmap = (source)

Undocumented

(type: Dict[str, Dict[str, int]])
def child(self, path): (source)

Create a ZipPath pointing at a path within the archive.

Parameterspatha bytes or unicode with no path separators in it (either '/' or the system path separator, if it's different).
def exists(self): (source)

Returns True if the underlying archive exists.

def getAccessTime(self): (source)

Return the archive file's last access time.

def getModificationTime(self): (source)

Return the archive file's modification time.

def getStatusChangeTime(self): (source)

Return the archive file's status change time.

def __repr__(self): (source)

Undocumented

ReturnsUndocumented (type: str)
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.