9#include "path_location_intf.hpp"
10#include "../metadata/metadata.hpp"
11#include "../telemetry/telemetry.hpp"
12#include "../utility/utility.hpp"
13#include "../macros.hpp"
17hi_export_module(hikogui.path.path_location : impl);
32 hi_log_fatal(
"Could not get known folder path.");
38 return std::filesystem::path{
wpath} /
"";
58 hi_log_fatal(
"Could not get executable path. It exceeds the buffer length of 32768 chars.");
63 return get_module_path(
nullptr);
66[[
nodiscard]] hi_no_inline
inline std::filesystem::path get_library_path()
noexcept
71 hi_log_fatal(
"Could not get a handle to the current module.");
86 co_yield get_executable_path();
90 co_yield get_path(executable_file).remove_filename();
94 co_yield get_library_path();
98 co_yield get_path(library_file).remove_filename();
118 co_yield local_app_data / get_application_vendor() / get_application_name() /
"";
124 co_yield get_path(data_dir) /
"Log" /
"";
128 co_yield get_path(data_dir) /
"preferences.json";
139 co_yield path /
"fonts" /
"";
148 co_yield path /
"themes" /
"";
Rules for working with win32 headers.
path_location
File and Directory locations.
Definition path_location_intf.hpp:24
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_intf.hpp:112
@ 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:16
std::filesystem::path get_path_by_id(const KNOWNFOLDERID &folder_id) noexcept
Convenience function for SHGetKnownFolderPath().
Definition path_location_win32_impl.hpp:28
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:377