dissect.target.filesystems.zip
#
Module Contents#
Classes#
Filesystem implementation for zip files. |
|
Virtual file backed by a file-like object. |
|
Virtual directory implementation. Backed by a dict. |
Attributes#
- dissect.target.filesystems.zip.log#
- class dissect.target.filesystems.zip.ZipFilesystem(fh: BinaryIO, base: str | None = None, *args, **kwargs)#
Bases:
dissect.target.filesystem.Filesystem
Filesystem implementation for zip files.
Python does not have symlink support in the zipfile module, so that’s not currently supported. See https://github.com/python/cpython/issues/82102 for more information.
- __fstype__ = 'zip'#
- get(path: str, relentry: dissect.target.filesystem.FilesystemEntry = None) dissect.target.filesystem.FilesystemEntry #
Returns a ZipFilesystemEntry object corresponding to the given path.
- class dissect.target.filesystems.zip.ZipFilesystemEntry(fs: Filesystem, path: str, entry: Any)#
Bases:
dissect.target.filesystem.VirtualFile
Virtual file backed by a file-like object.
- open() BinaryIO #
Returns file handle (file-like object).
- abstract readlink() str #
Read the link if this entry is a symlink. Returns a string.
- abstract readlink_ext() dissect.target.filesystem.FilesystemEntry #
Read the link if this entry is a symlink. Returns a filesystem entry.
- stat(follow_symlinks: bool = True) dissect.target.helpers.fsutil.stat_result #
Return the stat information of this entry.
- lstat() dissect.target.helpers.fsutil.stat_result #
Return the stat information of the given path, without resolving links.
- class dissect.target.filesystems.zip.ZipFilesystemDirectoryEntry(fs: ZipFilesystem, path: str, entry: zipfile.ZipInfo)#
Bases:
dissect.target.filesystem.VirtualDirectory
Virtual directory implementation. Backed by a dict.
- stat(follow_symlinks: bool = True) dissect.target.helpers.fsutil.stat_result #
Return the stat information of this entry.
- lstat() dissect.target.helpers.fsutil.stat_result #
Return the stat information of the given path, without resolving links.