sim_explorer.utils.paths¶
Functions
|
Get the full path of p1. |
|
Identify the path of p1 relative to the file p2. |
- sim_explorer.utils.paths.get_path(p1: str, base: Path | None = None) Path¶
Get the full path of p1.
if p1 exists and no base provided or the full path is provided and exists, p1 is returned as Path object
if base is provided, p1 relative to base is returned
if base is not provided (None), p1 relative to the current directory (cwd) is returned.
This is useful for specification files, where absolute paths cannot be used.
- sim_explorer.utils.paths.relative_path(p1: Path, p2: Path) str¶
Identify the path of p1 relative to the file p2.