platformdirs 0.1.0
📂 Python's platformdirs module for C++
Loading...
Searching...
No Matches
windows.h
Go to the documentation of this file.
1#pragma once
2#include "api.h"
3#include <filesystem>
4#include <optional>
5#include <string>
6#include <variant>
7
8namespace platformdirs {
9namespace windows {
10
12public:
13 windows(const std::optional<std::string> &appname = std::nullopt,
14 const std::variant<std::string, std::nullopt_t, bool> &appauthor =
15 std::nullopt,
16 const std::optional<std::string> &version = std::nullopt,
17 bool roaming = false, bool multipath = false, bool opinion = true,
18 bool ensure_exists = false);
19
20 std::string user_data_dir() const override;
21
22private:
23 struct append_parts_options {
24 std::optional<std::string> opinion_value;
25 };
26 std::string append_parts(
27 const std::string &path,
28 const platformdirs::windows::windows::append_parts_options &options = {})
29 const;
30
31public:
32 std::string site_data_dir() const override;
33
34 std::string user_config_dir() const override;
35
36 std::string site_config_dir() const override;
37
38 std::string user_cache_dir() const override;
39
40 std::string site_cache_dir() const override;
41
42 std::string user_state_dir() const override;
43
44 std::string user_log_dir() const override;
45
46 std::string user_documents_dir() const override;
47
48 std::string user_downloads_dir() const override;
49
50 std::string user_pictures_dir() const override;
51
52 std::string user_videos_dir() const override;
53
54 std::string user_music_dir() const override;
55
56 std::string user_desktop_dir() const override;
57
58 std::string user_runtime_dir() const override;
59
60 std::string site_runtime_dir() const override;
61};
62
63} // namespace windows
64} // namespace platformdirs
std::optional< std::string > version
Definition api.h:15
bool multipath
Definition api.h:17
std::variant< std::string, std::nullopt_t, bool > appauthor
Definition api.h:14
bool ensure_exists
Definition api.h:19
bool roaming
Definition api.h:16
bool opinion
Definition api.h:18
std::optional< std::string > appname
Definition api.h:13
Definition windows.h:11
std::string site_runtime_dir() const override
Definition windows.cpp:135
std::string user_desktop_dir() const override
Definition windows.cpp:122
std::string user_cache_dir() const override
Definition windows.cpp:77
std::string site_data_dir() const override
Definition windows.cpp:63
std::string user_music_dir() const override
Definition windows.cpp:118
std::string user_data_dir() const override
Definition windows.cpp:19
std::string user_state_dir() const override
Definition windows.cpp:89
std::string user_documents_dir() const override
Definition windows.cpp:102
std::string user_runtime_dir() const override
Definition windows.cpp:126
std::string user_videos_dir() const override
Definition windows.cpp:114
std::string site_cache_dir() const override
Definition windows.cpp:83
std::string user_config_dir() const override
Definition windows.cpp:69
std::string user_pictures_dir() const override
Definition windows.cpp:110
std::string site_config_dir() const override
Definition windows.cpp:73
std::string user_downloads_dir() const override
Definition windows.cpp:106
std::string user_log_dir() const override
Definition windows.cpp:93
Definition platformdirs.h:27