Path
class Path
Class representing a search path for files, consisting of a list of directories to search in.
method void append_directory(std::filesystem::path directory)
Append a directory to the search path.
| Parameter | Description |
|---|---|
directory |
The directory to append to the search path. TYPE: |
method void append_path(const Path &path, const std::string &subdirectory = "")
Append another path to the search path.
| Parameter | Description |
|---|---|
path |
The path to append. TYPE: |
subdirectory |
An optional subdirectory to add to each directory in the appended path. TYPE: |
method bool empty()
Check if the search path is empty.
| Returns | Description |
|---|---|
bool |
|
method Symbol find(Symbol name, Symbol base = {})
Find a file in the search path.
| Parameter | Description |
|---|---|
name |
The name of the file to find. TYPE: |
base |
An optional base directory to resolve relative paths against. TYPE: |
| Returns | Description |
|---|---|
Symbol |
The name to the found file, or the empty symbol if the file was not found. |
method void prepend_directory(std::filesystem::path directory)
Prepend a directory to the search path.
| Parameter | Description |
|---|---|
directory |
The directory to prepend to the search path. TYPE: |
method void prepend_path(const Path &path, const std::string &subdirectory = "")
Prepend another path to the search path.
| Parameter | Description |
|---|---|
path |
The path to prepend. TYPE: |
subdirectory |
An optional subdirectory to add to each directory in the prepended path. TYPE: |
member const empty_path
An empty path.