platformdirs 0.1.0
📂 Python's platformdirs module for C++
Loading...
Searching...
No Matches
platformdirs::api::platform_dirs_abc Class Referenceabstract

#include <api.h>

Inheritance diagram for platformdirs::api::platform_dirs_abc:
platformdirs::macos::macos platformdirs::unix::unix platformdirs::windows::windows

Public Member Functions

 platform_dirs_abc (const std::optional< std::string > &appname=std::nullopt, const std::variant< std::string, std::nullopt_t, bool > &appauthor=std::nullopt, const std::optional< std::string > &version=std::nullopt, bool roaming=false, bool multipath=false, bool opinion=true, bool ensure_exists=false)
 
virtual std::string user_data_dir () const =0
 
virtual std::string site_data_dir () const =0
 
virtual std::string user_config_dir () const =0
 
virtual std::string site_config_dir () const =0
 
virtual std::string user_cache_dir () const =0
 
virtual std::string site_cache_dir () const =0
 
virtual std::string user_state_dir () const =0
 
virtual std::string user_log_dir () const =0
 
virtual std::string user_documents_dir () const =0
 
virtual std::string user_downloads_dir () const =0
 
virtual std::string user_pictures_dir () const =0
 
virtual std::string user_videos_dir () const =0
 
virtual std::string user_music_dir () const =0
 
virtual std::string user_desktop_dir () const =0
 
virtual std::string user_runtime_dir () const =0
 
virtual std::string site_runtime_dir () const =0
 
virtual std::filesystem::path user_data_path () const
 
virtual std::filesystem::path site_data_path () const
 
virtual std::filesystem::path user_config_path () const
 
virtual std::filesystem::path site_config_path () const
 
virtual std::filesystem::path user_cache_path () const
 
virtual std::filesystem::path site_cache_path () const
 
virtual std::filesystem::path user_state_path () const
 
virtual std::filesystem::path user_log_path () const
 
virtual std::filesystem::path user_documents_path () const
 
virtual std::filesystem::path user_downloads_path () const
 
virtual std::filesystem::path user_pictures_path () const
 
virtual std::filesystem::path user_videos_path () const
 
virtual std::filesystem::path user_music_path () const
 
virtual std::filesystem::path user_desktop_path () const
 
virtual std::filesystem::path user_runtime_path () const
 
virtual std::filesystem::path site_runtime_path () const
 

Public Attributes

std::optional< std::string > appname
 
std::variant< std::string, std::nullopt_t, bool > appauthor
 
std::optional< std::string > version
 
bool roaming
 
bool multipath
 
bool opinion
 
bool ensure_exists
 

Protected Member Functions

auto append_app_name_and_version (const std::vector< std::string > &base) const -> std::string
 
auto optionally_create_directory (const std::string &path) const -> void
 

Constructor & Destructor Documentation

◆ platform_dirs_abc()

platformdirs::api::platform_dirs_abc::platform_dirs_abc ( const std::optional< std::string > & appname = std::nullopt,
const std::variant< std::string, std::nullopt_t, bool > & appauthor = std::nullopt,
const std::optional< std::string > & version = std::nullopt,
bool roaming = false,
bool multipath = false,
bool opinion = true,
bool ensure_exists = false )

Member Function Documentation

◆ append_app_name_and_version()

auto platformdirs::api::platform_dirs_abc::append_app_name_and_version ( const std::vector< std::string > & base) const -> std::string
protected

◆ optionally_create_directory()

auto platformdirs::api::platform_dirs_abc::optionally_create_directory ( const std::string & path) const -> void
protected

◆ site_cache_dir()

virtual std::string platformdirs::api::platform_dirs_abc::site_cache_dir ( ) const
pure virtual

◆ site_cache_path()

std::filesystem::path platformdirs::api::platform_dirs_abc::site_cache_path ( ) const
virtual

Reimplemented in platformdirs::unix::unix.

◆ site_config_dir()

virtual std::string platformdirs::api::platform_dirs_abc::site_config_dir ( ) const
pure virtual

◆ site_config_path()

std::filesystem::path platformdirs::api::platform_dirs_abc::site_config_path ( ) const
virtual

Reimplemented in platformdirs::unix::unix.

◆ site_data_dir()

virtual std::string platformdirs::api::platform_dirs_abc::site_data_dir ( ) const
pure virtual

◆ site_data_path()

std::filesystem::path platformdirs::api::platform_dirs_abc::site_data_path ( ) const
virtual

Reimplemented in platformdirs::unix::unix.

◆ site_runtime_dir()

virtual std::string platformdirs::api::platform_dirs_abc::site_runtime_dir ( ) const
pure virtual

◆ site_runtime_path()

std::filesystem::path platformdirs::api::platform_dirs_abc::site_runtime_path ( ) const
virtual

◆ user_cache_dir()

virtual std::string platformdirs::api::platform_dirs_abc::user_cache_dir ( ) const
pure virtual

◆ user_cache_path()

std::filesystem::path platformdirs::api::platform_dirs_abc::user_cache_path ( ) const
virtual

◆ user_config_dir()

virtual std::string platformdirs::api::platform_dirs_abc::user_config_dir ( ) const
pure virtual

◆ user_config_path()

std::filesystem::path platformdirs::api::platform_dirs_abc::user_config_path ( ) const
virtual

◆ user_data_dir()

virtual std::string platformdirs::api::platform_dirs_abc::user_data_dir ( ) const
pure virtual

◆ user_data_path()

std::filesystem::path platformdirs::api::platform_dirs_abc::user_data_path ( ) const
virtual

◆ user_desktop_dir()

virtual std::string platformdirs::api::platform_dirs_abc::user_desktop_dir ( ) const
pure virtual

◆ user_desktop_path()

std::filesystem::path platformdirs::api::platform_dirs_abc::user_desktop_path ( ) const
virtual

◆ user_documents_dir()

virtual std::string platformdirs::api::platform_dirs_abc::user_documents_dir ( ) const
pure virtual

◆ user_documents_path()

std::filesystem::path platformdirs::api::platform_dirs_abc::user_documents_path ( ) const
virtual

◆ user_downloads_dir()

virtual std::string platformdirs::api::platform_dirs_abc::user_downloads_dir ( ) const
pure virtual

◆ user_downloads_path()

std::filesystem::path platformdirs::api::platform_dirs_abc::user_downloads_path ( ) const
virtual

◆ user_log_dir()

virtual std::string platformdirs::api::platform_dirs_abc::user_log_dir ( ) const
pure virtual

◆ user_log_path()

std::filesystem::path platformdirs::api::platform_dirs_abc::user_log_path ( ) const
virtual

◆ user_music_dir()

virtual std::string platformdirs::api::platform_dirs_abc::user_music_dir ( ) const
pure virtual

◆ user_music_path()

std::filesystem::path platformdirs::api::platform_dirs_abc::user_music_path ( ) const
virtual

◆ user_pictures_dir()

virtual std::string platformdirs::api::platform_dirs_abc::user_pictures_dir ( ) const
pure virtual

◆ user_pictures_path()

std::filesystem::path platformdirs::api::platform_dirs_abc::user_pictures_path ( ) const
virtual

◆ user_runtime_dir()

virtual std::string platformdirs::api::platform_dirs_abc::user_runtime_dir ( ) const
pure virtual

◆ user_runtime_path()

std::filesystem::path platformdirs::api::platform_dirs_abc::user_runtime_path ( ) const
virtual

◆ user_state_dir()

virtual std::string platformdirs::api::platform_dirs_abc::user_state_dir ( ) const
pure virtual

◆ user_state_path()

std::filesystem::path platformdirs::api::platform_dirs_abc::user_state_path ( ) const
virtual

◆ user_videos_dir()

virtual std::string platformdirs::api::platform_dirs_abc::user_videos_dir ( ) const
pure virtual

◆ user_videos_path()

std::filesystem::path platformdirs::api::platform_dirs_abc::user_videos_path ( ) const
virtual

Member Data Documentation

◆ appauthor

std::variant<std::string, std::nullopt_t, bool> platformdirs::api::platform_dirs_abc::appauthor

◆ appname

std::optional<std::string> platformdirs::api::platform_dirs_abc::appname

◆ ensure_exists

bool platformdirs::api::platform_dirs_abc::ensure_exists

◆ multipath

bool platformdirs::api::platform_dirs_abc::multipath

◆ opinion

bool platformdirs::api::platform_dirs_abc::opinion

◆ roaming

bool platformdirs::api::platform_dirs_abc::roaming

◆ version

std::optional<std::string> platformdirs::api::platform_dirs_abc::version

The documentation for this class was generated from the following files: