class documentation
class ZipArchive(ZipPath[
Constructor: ZipArchive(archivePathname)
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.
Method | __cmp__ |
Undocumented |
Method | __init__ |
Create a ZipArchive, treating the archive at archivePathname as a zip file. |
Method | __repr__ |
Undocumented |
Method | child |
Create a ZipPath pointing at a path within the archive. |
Method | exists |
Returns True if the underlying archive exists. |
Method | get |
Return the archive file's last access time. |
Method | get |
Return the archive file's modification time. |
Method | get |
Return the archive file's status change time. |
Instance Variable | childmap |
Undocumented |
Instance Variable | path |
Undocumented |
Instance Variable | path |
Undocumented |
Instance Variable | zipfile |
Undocumented |
Property | archive |
Undocumented |
Instance Variable | _zipfile |
Undocumented |
Inherited from ZipPath
:
Method | basename |
Subclasses must implement this. |
Method | changed |
Clear any cached information about the state of this path on disk. |
Method | dirname |
Undocumented |
Method | getsize |
Retrieve this file's size. |
Method | isdir |
Subclasses must implement this. |
Method | isfile |
Check if this file path refers to a regular file. |
Method | islink |
Undocumented |
Method | listdir |
Subclasses must implement this. |
Method | open |
Subclasses must implement this. |
Method | parent |
Subclasses must implement this. |
Method | parents |
Retrieve an iterator of all the ancestors of this path. |
Method | sibling |
Return a FilePath with the same directory as this instance but with a basename of path. |
Method | splitext |
Return a value similar to that returned by os.path.splitext. |
Property | sep |
Return a zip directory separator. |
Method | _native |
Return parent, discarding our own encoding in favor of whatever the archive's is. |
Instance Variable | _native |
Undocumented |
Inherited from AbstractFilePath
(via ZipPath
):
Method | __hash__ |
Hash the same as another AbstractFilePath with the same path as mine. |
Method | children |
List the children of this path object. |
Method | descendant |
Retrieve a child or child's child of this path. |
Method | getatime |
Deprecated. Use getAccessTime instead. |
Method | get |
Retrieve the contents of the file at this path. |
Method | getctime |
Deprecated. Use getStatusChangeTime instead. |
Method | getmtime |
Deprecated. Use getModificationTime instead. |
Method | segments |
Return a list of segments between a child and its ancestor. |
Method | walk |
Yield myself, then each of my children, and each of those children's children in turn. |
Type Variable |
|
Undocumented |
overrides
twisted.python.zippath.ZipPath.child
Create a ZipPath pointing at a path within the archive.
Parameters | |
path:OtherAnyStr | a bytes or unicode with no path separators in it (either '/' or the system path separator, if it's different). |
Returns | |
ZipPath[ | Undocumented |