11#include "../generator.hpp"
12#include "../utility/module.hpp"
16namespace hi {
inline namespace v1 {
83[[nodiscard]]
inline std::optional<std::filesystem::path>
find_path(
path_location location, std::filesystem::path
const &ref)
noexcept
85 if (ref.is_absolute()) {
86 if (std::filesystem::exists(ref)) {
93 auto path = base / ref;
94 if (std::filesystem::exists(path)) {
112 auto it = std::ranges::begin(range);
113 hilet last = std::ranges::end(range);
122 throw url_error(
"More than one path found.");
#define hilet
Invariant should be the default for variables.
Definition utility.hpp:23
std::optional< std::filesystem::path > find_path(path_location location, std::filesystem::path const &ref) noexcept
Find a path.
Definition path_location.hpp:83
path_location
File and Directory locations.
Definition path_location.hpp:21
generator< std::filesystem::path > get_paths(path_location location)
Get a set of paths.
std::filesystem::path get_path(path_location location)
Get the single and only path.
Definition path_location.hpp:109
@ data_dir
The single directory where the data for the application is stored for the current user account.
@ resource_dirs
The location of application resources.
@ executable_file
A single file where the current running executable is located.
@ theme_dirs
The directories where the themes are located.
@ library_dir
The single directory where the HikoGUI shared library is located.
@ preferences_file
A single file where to store or load the application preferences file for the current user account.
@ executable_dir
The directory where the executable is located.
@ library_file
A single file where the current running HikoGUI shared library is located.
@ log_dir
The single directory where to store the log files.
@ system_font_dirs
The directories where the system fonts are stored.
@ font_dirs
The directories where the fonts for the system and resource fonts are located.
DOXYGEN BUG.
Definition algorithm.hpp:13
geometry/margins.hpp
Definition cache.hpp:11
Definition exception.hpp:200