Skip to main content

Module paths

Module paths 

Source
Expand description

Path rendering and configuration-relative path helpers.

Aster services commonly accept paths from static configuration while running with a fixed data base directory. This module centralizes the string-level path joining and normalization rules used by those services: redundant slashes are trimmed, . and safe .. components are folded, paths configured relative to the config file are rendered back as runtime-relative paths under the data base directory, and sqlite URLs keep their query string while resolving the embedded filesystem path. The helpers intentionally avoid filesystem canonicalization so they work before directories or database files exist.

Functionsยง

join_path
Joins two slash-separated path fragments without emitting duplicate separators.
normalize_path
Normalizes a path lexically without touching the filesystem.
render_runtime_relative_path
Renders a resolved path as a runtime-relative path under base_dir.
resolve_config_relative_path
Resolves a config value into the runtime path form used under base_dir.
resolve_config_relative_sqlite_url
Resolves the filesystem path inside a sqlite URL while preserving sqlite-specific values.
runtime_temp_dir
Returns the namespaced runtime temporary directory under temp_root.
runtime_temp_file_path
Returns a runtime temporary file path under the _runtime namespace.
task_temp_dir
Returns the temporary directory for a background task.
task_token_temp_dir
Returns the temporary directory for a specific task processing token.
temp_file_path
Returns the path to a temporary file under temp_dir.
upload_assembled_path
Returns the assembled-file temporary path for a multipart upload session.
upload_chunk_path
Returns the temporary path for one uploaded chunk.
upload_temp_dir
Returns the temporary directory for a multipart upload session.