Antkeeper  0.0.1
Functions
paths.cpp File Reference
#include <engine/utility/paths.hpp>
#include <cstddef>
#include <limits.h>
#include <stdexcept>
#include <pwd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

Go to the source code of this file.

Functions

std::filesystem::path get_executable_path ()
 Returns the absolute path to the current executable. More...
 
std::filesystem::path get_executable_data_path ()
 Returns the absolute path to the directory containing application data. More...
 
std::filesystem::path get_local_config_path ()
 Returns the absolute path to the directory containing user-specific, device-specific application data. More...
 
std::filesystem::path get_shared_config_path ()
 Returns the absolute path to the directory containing user-specific application data that may be shared across devices. More...
 

Function Documentation

◆ get_executable_data_path()

std::filesystem::path get_executable_data_path ( )

Returns the absolute path to the directory containing application data.

Windows: get_executable_path() GNU/Linux: get_executable_path()/../share/

Returns
Path to the application's data directory.

Definition at line 59 of file paths.cpp.

◆ get_executable_path()

std::filesystem::path get_executable_path ( )

Returns the absolute path to the current executable.

Returns
Path to the application's executable.

Definition at line 35 of file paths.cpp.

◆ get_local_config_path()

std::filesystem::path get_local_config_path ( )

Returns the absolute path to the directory containing user-specific, device-specific application data.

Windows: LOCALAPPDATA% GNU/Linux: $XDG_CONFIG_HOME or ~/.config/ if $XDG_CONFIG_HOME is not set.

Returns
Path to the local config directory.

Definition at line 68 of file paths.cpp.

◆ get_shared_config_path()

std::filesystem::path get_shared_config_path ( )

Returns the absolute path to the directory containing user-specific application data that may be shared across devices.

Windows: APPDATA% GNU/Linux: $XDG_CONFIG_HOME or ~/.config/ if $XDG_CONFIG_HOME is not set.

Returns
Path to the shared config directory.

Definition at line 110 of file paths.cpp.