Mercurial > minori
annotate include/core/filesystem.h @ 101:c537996cf67b
*: multitude of config changes
1. theme is now configurable from the settings menu
(but you have to restart for it to apply)
2. config is now stored in an INI file, with no method of
conversion from json (this repo is private-ish anyway)
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Fri, 03 Nov 2023 14:06:02 -0400 |
parents | 3d2decf093bb |
children | 39521c47c7a3 |
rev | line source |
---|---|
9 | 1 #ifndef __core__filesystem_h |
2 #define __core__filesystem_h | |
11 | 3 #include <string> |
4 | |
5 namespace Filesystem { | |
6 | |
61
327568ad9be9
core/fs: finish class-ification of paths
Paper <mrpapersonic@gmail.com>
parents:
59
diff
changeset
|
7 class Path { |
63 | 8 public: |
9 Path(); | |
10 Path(const std::string& path); | |
11 Path(const Path& path); | |
12 bool CreateDirectories() const; | |
13 bool Exists() const; | |
14 std::string Basename() const; | |
15 std::string Stem() const; | |
16 std::string Extension() const; | |
17 Path GetParent() const; | |
18 void SetPath(const std::string& path); | |
61
327568ad9be9
core/fs: finish class-ification of paths
Paper <mrpapersonic@gmail.com>
parents:
59
diff
changeset
|
19 std::string GetPath() const; |
327568ad9be9
core/fs: finish class-ification of paths
Paper <mrpapersonic@gmail.com>
parents:
59
diff
changeset
|
20 |
63 | 21 private: |
22 std::string _path; | |
61
327568ad9be9
core/fs: finish class-ification of paths
Paper <mrpapersonic@gmail.com>
parents:
59
diff
changeset
|
23 }; |
327568ad9be9
core/fs: finish class-ification of paths
Paper <mrpapersonic@gmail.com>
parents:
59
diff
changeset
|
24 |
63 | 25 Path GetDotPath(); // %APPDATA%/minori, ~/Library/Application Support/minori, ~/.config/minori... |
26 Path GetConfigPath(); // (dotpath)/config.json | |
61
327568ad9be9
core/fs: finish class-ification of paths
Paper <mrpapersonic@gmail.com>
parents:
59
diff
changeset
|
27 Path GetAnimeDBPath(); // (dotpath)/anime/db.json |
11 | 28 |
36 | 29 } // namespace Filesystem |
11 | 30 |
31 #endif // __core__filesystem_h |