7#include "../coroutine/module.hpp"
8#include "../utility/utility.hpp"
9#include "../metadata/metadata.hpp"
10#include "../macros.hpp"
21hi_export_module(hikogui.path.path_location : intf);
23namespace hi {
inline namespace v1 {
26hi_export
template<
typename Context>
28 std::ranges::input_range<Context>
and
29 std::convertible_to<std::ranges::range_value_t<std::remove_cvref_t<Context>>, std::filesystem::path>
and
30 not std::convertible_to<Context, std::filesystem::path>;
39hi_export
template<path_range Locations>
40[[
nodiscard]]
inline std::optional<std::filesystem::path>
43 if (ref.is_absolute()) {
44 if (std::filesystem::exists(ref)) {
51 auto path = base / ref;
52 if (std::filesystem::exists(path)) {
69 tmp.remove_filename();
108 using namespace std::literals;
154 auto path = std::filesystem::path{
__FILE__};
155 path.replace_filename(
"../../..");
hi_export std::optional< std::filesystem::path > find_path(Locations &&locations, std::filesystem::path const &ref) noexcept
Find a path.
Definition path_location_intf.hpp:41
DOXYGEN BUG.
Definition algorithm.hpp:16
geometry/margins.hpp
Definition lookahead_iterator.hpp:5
hi_export generator< std::filesystem::path > font_files() noexcept
The directories to search for font files of both the application and system.
hi_export std::filesystem::path executable_file() noexcept
Get the full path to this executable.
hi_export std::filesystem::path data_dir() noexcept
Get the full path to the directory where the application should store its data.
hi_export std::filesystem::path log_dir() noexcept
Get the full path to the directory where the application should store its log files.
std::optional< std::filesystem::path > library_install_dir() noexcept
The full path where HikoGUI is installed during compilation of the application.
Definition path_location_intf.hpp:146
hi_export generator< std::filesystem::path > resource_dirs() noexcept
The directories to search for resource files.
hi_export generator< std::filesystem::path > system_font_files() noexcept
The directories to search for system font files.
hi_export std::filesystem::path executable_dir() noexcept
Get the full path to the directory when this executable is located.
Definition path_location_intf.hpp:66
hi_export std::basic_string< CharT, Traits > getline(std::basic_istream< CharT, Traits > &in, size_t max_size) noexcept
Get a line from an input string, upto a maximum size.
Definition misc.hpp:127
hi_export generator< std::filesystem::path > theme_files() noexcept
The directories to search for theme files of the application.
hi_export std::filesystem::path preferences_file() noexcept
Get the full path to application preferences file.
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:377
hi_export std::optional< std::filesystem::path > source_dir() noexcept
Get the full path to source code of this executable.
Definition path_location_intf.hpp:106
Definition path_location_intf.hpp:27