dissect.target.filesystems.fat

Module Contents

Classes

FatFilesystem

Base class for filesystems.

FatDirEntry

Directory entry base class. Closely models os.DirEntry.

FatFilesystemEntry

Base class for filesystem entries.

class dissect.target.filesystems.fat.FatFilesystem(fh: BinaryIO, *args, **kwargs)

Bases: dissect.target.filesystem.Filesystem

Base class for filesystems.

__type__ = 'fat'

A short string identifying the type of filesystem.

fatfs
tzinfo
get(path: str) dissect.target.filesystem.FilesystemEntry

Retrieve a FilesystemEntry from the filesystem.

Parameters:

path – The path which we want to retrieve.

Returns:

A FilesystemEntry for the path.

class dissect.target.filesystems.fat.FatDirEntry(fs: Filesystem, path: str, name: str, entry: Any)

Bases: 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.

Parameters:
  • fs – The filesystem the entry belongs to.

  • path – The path of the parent directory.

  • name – The name of the entry.

  • entry – The raw entry backing this directory entry.

fs: FatFilesystem

The filesystem the entry belongs to.

entry: dissect.fat.fat.RootDirectory | dissect.fat.fat.DirectoryEntry

The raw entry backing this directory entry.

get() FatFilesystemEntry

Retrieve the FilesystemEntry this directory entry points to.

Subclasses should override this method to provide an efficient implementation.

stat(*, follow_symlinks: bool = True) dissect.target.helpers.fsutil.stat_result
class dissect.target.filesystems.fat.FatFilesystemEntry(fs: Filesystem, path: str, entry: Any)

Bases: dissect.target.filesystem.FilesystemEntry

Base class for filesystem entries.

fs: FatFilesystem
entry: dissect.fat.fat.RootDirectory | dissect.fat.fat.DirectoryEntry
get(path: str) dissect.target.filesystem.FilesystemEntry

Get a filesystem entry relative from the current one.

open() BinaryIO

Returns file handle (file-like object).

scandir() collections.abc.Iterator[dissect.target.filesystem.FilesystemEntry]

List the directory contents of this directory. Returns a generator of filesystem entries.

Return whether this entry is a link.

is_dir(follow_symlinks: bool = True) bool

Return whether this entry is a directory.

is_file(follow_symlinks: bool = True) bool

Return whether this entry is a file.

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.