|
ORE Studio 0.0.4
|
Provides access to project root directory for test resource location. More...
#include <project_root.hpp>

Static Public Member Functions | |
| static std::filesystem::path | get () |
| Returns the absolute path to the project root directory. | |
| static std::filesystem::path | resolve (const std::filesystem::path &relative_path) |
| Resolves a project-relative path to an absolute path. | |
Provides access to project root directory for test resource location.
This helper finds the project root by walking up from the current working directory looking for a .git directory. Tests can use this to locate resources using project-relative paths, avoiding fragile relative paths like "../../../".
|
static |
Returns the absolute path to the project root directory.
Searches upward from the current working directory for a directory containing .git. The result is cached after the first call.
| std::runtime_error | if .git directory cannot be found. |

|
static |
Resolves a project-relative path to an absolute path.
| relative_path | Path relative to the project root (e.g., "external/ore/examples") |
| std::runtime_error | if project root cannot be found. |