Project Directory
- class hal_py.ProjectDirectory
Represents a project directory.
- static generate_random() hal_py.ProjectDirectory
Generates a random directory name in the current working directory.
- Returns
The absolute path to the generated directory.
- Return type
- get_canonical_path(self: hal_py.ProjectDirectory) os.PathLike
Returns the canonical path to the project directory.
- Returns
The absolute canonical path to the project directory. If no project path is given, an empty path is returned.
- Return type
- get_default_filename(self: hal_py.ProjectDirectory, extension: str = '') os.PathLike
Returns the default file name for the project directory, which is a file with the same name as the project directory plus an extension.
- get_filename(self: hal_py.ProjectDirectory, relative_filename: str) os.PathLike
Returns the absolute path to a file within the project directory.
- get_relative_file_path(self: hal_py.ProjectDirectory, filename: str) os.PathLike
Returns the relative file path if the file is within the project directory.
- get_shadow_dir(self: hal_py.ProjectDirectory) os.PathLike
Returns the path to the autosave (shadow) directory.
- Returns
The absolute path to the autosave directory.
- Return type
- get_shadow_filename(self: hal_py.ProjectDirectory, extension: str = '') os.PathLike
Returns the file name within the autosave (shadow) directory.