Mercurial > minori
annotate include/core/filesystem.h @ 118:39521c47c7a3
*: another huge megacommit, SORRY
The torrents page works a lot better now
Added the edit option to the anime list right click menu
Vectorized currently playing files
Available player and extensions are now loaded at runtime
from files in (dotpath)/players.json and (dotpath)/extensions.json
These paths are not permanent and will likely be moved to
(dotpath)/recognition
...
...
...
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Tue, 07 Nov 2023 23:40:54 -0500 |
parents | 3d2decf093bb |
children | 0a458cb26ff4 |
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 |
118
39521c47c7a3
*: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents:
63
diff
changeset
|
25 Path GetDotPath(); // %APPDATA%/minori, ~/Library/Application Support/minori, ~/.config/minori... |
39521c47c7a3
*: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents:
63
diff
changeset
|
26 Path GetConfigPath(); // (dotpath)/config.json |
39521c47c7a3
*: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents:
63
diff
changeset
|
27 Path GetAnimeDBPath(); // (dotpath)/anime/db.json |
39521c47c7a3
*: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents:
63
diff
changeset
|
28 Path GetPlayersPath(); // (dotpath)/player.json |
39521c47c7a3
*: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents:
63
diff
changeset
|
29 Path GetExtensionsPath(); // (dotpath)/extensions.json |
11 | 30 |
36 | 31 } // namespace Filesystem |
11 | 32 |
33 #endif // __core__filesystem_h |