:py:mod:`dissect.target.filesystems.vmfs` ========================================= .. py:module:: dissect.target.filesystems.vmfs Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: dissect.target.filesystems.vmfs.VmfsFilesystem dissect.target.filesystems.vmfs.VmfsDirEntry dissect.target.filesystems.vmfs.VmfsFilesystemEntry .. py:class:: VmfsFilesystem(fh: BinaryIO, *args, **kwargs) Bases: :py:obj:`dissect.target.filesystem.Filesystem` Base class for filesystems. .. py:attribute:: __type__ :value: 'vmfs' A short string identifying the type of filesystem. .. py:attribute:: vmfs .. py:method:: get(path: str) -> dissect.target.filesystem.FilesystemEntry Retrieve a :class:`FilesystemEntry` from the filesystem. :param path: The path which we want to retrieve. :returns: A :class:`FilesystemEntry` for the path. .. py:class:: VmfsDirEntry(fs: Filesystem, path: str, name: str, entry: Any) Bases: :py:obj:`dissect.target.filesystem.DirEntry` Directory entry base class. Closely models ``os.DirEntry``. Filesystem implementations are encouraged to subclass this class to provide efficient implementations of the various methods. :param fs: The filesystem the entry belongs to. :param path: The path of the parent directory. :param name: The name of the entry. :param entry: The raw entry backing this directory entry. .. py:attribute:: fs :type: VmfsFilesystem The filesystem the entry belongs to. .. py:attribute:: entry :type: dissect.vmfs.DirEntry The raw entry backing this directory entry. .. py:method:: get() -> VmfsFilesystemEntry Retrieve the :class:`FilesystemEntry` this directory entry points to. Subclasses should override this method to provide an efficient implementation. .. py:method:: is_dir(*, follow_symlinks: bool = True) -> bool Return whether this entry is a directory or a symbolic link pointing to a directory. Subclasses should override this method to provide an efficient implementation. .. py:method:: is_file(*, follow_symlinks: bool = True) -> bool Return whether this entry is a file or a symbolic link pointing to a file. Subclasses should override this method to provide an efficient implementation. .. py:method:: is_symlink() -> bool Return whether this entry is a symbolic link. Subclasses should override this method to provide an efficient implementation. .. py:method:: stat(*, follow_symlinks: bool = True) -> dissect.target.helpers.fsutil.stat_result .. py:class:: VmfsFilesystemEntry(fs: Filesystem, path: str, entry: Any) Bases: :py:obj:`dissect.target.filesystem.FilesystemEntry` Base class for filesystem entries. .. py:attribute:: fs :type: VmfsFilesystem .. py:attribute:: entry :type: dissect.vmfs.FileDescriptor .. py:method:: get(path: str) -> dissect.target.filesystem.FilesystemEntry Get a filesystem entry relative from the current one. .. py:method:: open() -> BinaryIO Returns file handle (file-like object). .. py:method:: scandir() -> collections.abc.Iterator[VmfsDirEntry] List the directory contents of this directory. Returns a generator of filesystem entries. .. 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 of the given path if it is a symlink. Returns a string. .. 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.