paper_firehose.core.paths¶
Utilities for locating runtime data and built-in system assets.
Functions
Ensure the data directory exists on disk and return it. |
|
Return the configured runtime data directory. |
|
Return the repository's bundled system directory. |
|
|
Return a path inside the repository's system directory. |
|
Resolve a directory inside the runtime data directory. |
|
Resolve a configured file path against the data directory. |
|
Resolve a path underneath the runtime data directory. |
- paper_firehose.core.paths.ensure_data_dir()[source]¶
Ensure the data directory exists on disk and return it.
- Return type:
- paper_firehose.core.paths.get_data_dir()[source]¶
Return the configured runtime data directory.
Honors the PAPER_FIREHOSE_DATA_DIR environment variable; otherwise defaults to ~/.paper_firehose on the current platform.
- Return type:
- paper_firehose.core.paths.get_system_dir()[source]¶
Return the repository’s bundled system directory.
- Return type:
- paper_firehose.core.paths.get_system_path(*relative)[source]¶
Return a path inside the repository’s system directory.
- paper_firehose.core.paths.resolve_data_dir(*relative, ensure_exists=False)[source]¶
Resolve a directory inside the runtime data directory.
- paper_firehose.core.paths.resolve_data_file(path, ensure_parent=False)[source]¶
Resolve a configured file path against the data directory.
Absolute paths (or explicit ones containing a drive letter on Windows) are used as-is. Relative paths are interpreted relative to the runtime data dir, with legacy “assets/” prefixes stripped for backward compatibility.