Consolix
Toggle main menu visibility
Loading...
Searching...
No Matches
Path Utilities
Path Utilities
This module provides functions for working with file and directory paths. It includes:
Retrieving the directory where the executable is located.
Creating directories recursively.
Constructing relative paths.
Key Functions:
resolve_exec_path
: Resolves a path relative to the executable directory.
make_relative
: Builds a path from a base directory to a target file.
create_directories
: Creates directories for the specified path.
Example:
#include <
consolix/utils/path_utils.hpp
>
int
main
() {
// Retrieve the directory of the executable
std::string exe_path =
consolix::resolve_exec_path
(
"."
);
std::cout <<
"Executable Path: "
<< exe_path << std::endl;
return
0;
}
consolix::resolve_exec_path
std::string resolve_exec_path(const std::string &relative_path)
Resolves a relative path to absolute, based on executable location.
Definition
path_utils.hpp:66
path_utils.hpp
Utilities for working with file and directory paths, including resolving paths relative to the execut...
main
int main()
Definition
test_strip_json_comments.cpp:28
Generated by
1.17.0