dissect.target.helpers.compat.path_common
#
Module Contents#
Functions#
Return the canonical path of the specified filename, eliminating any symbolic links encountered in the path. |
|
Return True if the path is a junction. |
|
Open file and return a stream. |
- dissect.target.helpers.compat.path_common.scandir(path: dissect.target.helpers.fsutil.TargetPath) _DissectScandirIterator #
- dissect.target.helpers.compat.path_common.realpath(path: dissect.target.helpers.fsutil.TargetPath, *, strict: bool = False) str #
Return the canonical path of the specified filename, eliminating any symbolic links encountered in the path.
- dissect.target.helpers.compat.path_common.isjunction(path: dissect.target.helpers.fsutil.TargetPath) bool #
Return True if the path is a junction.
- dissect.target.helpers.compat.path_common.io_open(path: dissect.target.helpers.fsutil.TargetPath, mode: str = 'rb', buffering: int = 0, encoding: str | None = None, errors: str | None = None, newline: str | None = None) IO #
Open file and return a stream.
Supports a subset of features of the real pathlib.open/io.open.
Note: in contrast to regular Python, the mode is binary by default. Text mode has to be explicitly specified. Buffering is also disabled by default.