:py:mod:`dissect.target.filesystems.tar` ======================================== .. py:module:: dissect.target.filesystems.tar Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: dissect.target.filesystems.tar.TarFilesystem dissect.target.filesystems.tar.TarFilesystemEntry dissect.target.filesystems.tar.TarFilesystemDirectoryEntry Attributes ~~~~~~~~~~ .. autoapisummary:: dissect.target.filesystems.tar.log .. py:data:: log .. py:class:: TarFilesystem(fh: BinaryIO, base: Optional[str] = None, tarinfo: Optional[tarfile.TarInfo] = None, *args, **kwargs) Bases: :py:obj:`dissect.target.filesystem.Filesystem` Filesystem implementation for tar files. .. py:attribute:: __type__ :value: 'tar' .. py:method:: get(path: str, relentry: Optional[dissect.target.filesystem.FilesystemEntry] = None) -> dissect.target.filesystem.FilesystemEntry Returns a TarFilesystemEntry object corresponding to the given path. .. py:class:: TarFilesystemEntry(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:: iterdir() -> Iterator[str] Iterate over the contents of a directory, return them as strings. :returns: An iterator of directory entries as path strings. .. py:method:: scandir() -> Iterator[dissect.target.filesystem.FilesystemEntry] Iterate over the contents of a directory, yields :class:`FilesystemEntry`. :returns: An iterator of :class:`FilesystemEntry`. .. py:method:: is_dir(follow_symlinks: bool = True) -> bool Return whether this entry is a directory. .. py:method:: is_file(follow_symlinks: bool = True) -> bool Return whether this entry is a file. .. py:method:: is_symlink() -> bool Return whether this entry is a link. .. py:method:: readlink() -> str Read the link if this entry is a symlink. Returns a string. .. py:method:: readlink_ext() -> dissect.target.filesystem.FilesystemEntry 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:: TarFilesystemDirectoryEntry(fs: TarFilesystem, path: str, entry: tarfile.TarInfo) 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.