:py:mod:`dissect.target.filesystems.zip` ======================================== .. py:module:: dissect.target.filesystems.zip Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: dissect.target.filesystems.zip.ZipFilesystem dissect.target.filesystems.zip.ZipFilesystemEntry dissect.target.filesystems.zip.ZipFilesystemDirectoryEntry Attributes ~~~~~~~~~~ .. autoapisummary:: dissect.target.filesystems.zip.log .. py:data:: log .. py:class:: ZipFilesystem(fh: BinaryIO, base: Optional[str] = None, *args, **kwargs) Bases: :py:obj:`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. .. py:attribute:: __type__ :value: 'zip' .. py:method:: get(path: str, relentry: dissect.target.filesystem.FilesystemEntry = None) -> dissect.target.filesystem.FilesystemEntry Returns a ZipFilesystemEntry object corresponding to the given path. .. py:class:: ZipFilesystemEntry(fs: Filesystem, path: str, entry: Any) Bases: :py:obj:`dissect.target.filesystem.VirtualFile` Virtual file backed by a file-like object. .. py:method:: open() -> BinaryIO Returns file handle (file-like object). .. py:method:: readlink() -> str :abstractmethod: Read the link if this entry is a symlink. Returns a string. .. py:method:: readlink_ext() -> dissect.target.filesystem.FilesystemEntry :abstractmethod: Read the link if this entry is a symlink. Returns a filesystem entry. .. py:method:: stat(follow_symlinks: bool = True) -> dissect.target.helpers.fsutil.stat_result Return the stat information of this entry. .. py:method:: lstat() -> dissect.target.helpers.fsutil.stat_result Return the stat information of the given path, without resolving links. .. py:class:: ZipFilesystemDirectoryEntry(fs: ZipFilesystem, path: str, entry: zipfile.ZipInfo) Bases: :py:obj:`dissect.target.filesystem.VirtualDirectory` Virtual directory implementation. Backed by a dict. .. py:method:: stat(follow_symlinks: bool = True) -> dissect.target.helpers.fsutil.stat_result Return the stat information of this entry. .. py:method:: lstat() -> dissect.target.helpers.fsutil.stat_result Return the stat information of the given path, without resolving links.