Mercurial > minori
annotate include/core/filesystem.h @ 102:b315f3759c56
*: big patch
1. use a wrapper for mINI that enables case sensitivity
(personal preference)
2. rename dark_theme.cc to theme.cc and change it to be
a class
3. include the "dep" folder so we don't have stupidity in
json.h or ini.h
4. I think the graph was also tweaked a lot in this, nothing
is constexpr and size is found at runtime...
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Fri, 03 Nov 2023 21:32:52 -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 |