dissect.target.filesystems.cramfs

Module Contents

Classes

CramfsFilesystem

Base class for filesystems.

CramfsFilesystemEntry

Base class for filesystem entries.

class dissect.target.filesystems.cramfs.CramfsFilesystem(fh: BinaryIO, *args, **kwargs)

Bases: dissect.target.filesystem.Filesystem

Base class for filesystems.

__type__ = 'cramfs'

A short string identifying the type of filesystem.

cramfs
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.cramfs.CramfsFilesystemEntry(fs: Filesystem, path: str, entry: Any)

Bases: dissect.target.filesystem.FilesystemEntry

Base class for filesystem entries.

fs: CramfsFilesystem
entry: dissect.cramfs.INode
get(path: str) dissect.target.filesystem.FilesystemEntry

Retrieve a FilesystemEntry relative to this entry.

Parameters:

path – The path relative to this filesystem entry.

Returns:

A relative FilesystemEntry.

open() BinaryIO

Returns file handle (file-like object).

iterdir() collections.abc.Iterator[str]

List the directory contents of a directory. Returns a generator of strings.

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

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

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.

Return whether this entry is a link.

Read the link of the given path if it is a symlink. Returns a string.

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.