StateManagement::PathResolver
StateManagement::PathResolver
#include <PathResolver.hpp>
Public Functions
| Name | |
|---|---|
| std::string | toRelative(std::string const & absolute_path, std::string const & workspace_dir) Convert an absolute path to a relative path based on workspace directory. |
| std::string | toAbsolute(std::string const & relative_path, std::string const & workspace_dir) Convert a relative path to an absolute path based on workspace directory. |
| bool | fileExists(std::string const & path) Check whether a file or directory exists. |
Public Functions Documentation
function toRelative
static inline std::string toRelative(
std::string const & absolute_path,
std::string const & workspace_dir
)Convert an absolute path to a relative path based on workspace directory.
Parameters:
- absolute_path The absolute path to convert
- workspace_dir The directory containing the workspace file
Return: Relative path string, or the original path if conversion fails
function toAbsolute
static inline std::string toAbsolute(
std::string const & relative_path,
std::string const & workspace_dir
)Convert a relative path to an absolute path based on workspace directory.
Parameters:
- relative_path The relative path to resolve
- workspace_dir The directory containing the workspace file
Return: Absolute path string
function fileExists
static inline bool fileExists(
std::string const & path
)Check whether a file or directory exists.
Parameters:
- path Path to check (absolute or relative)
Return: true if it exists on disk
Updated on 2026-11-13 at 20:25:41 +0000