Mercurial > minori
annotate include/core/filesystem.h @ 59:327e9a5c72f1
filesystem: add basename and stem functions
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Thu, 28 Sep 2023 13:45:45 -0400 |
parents | 4b05bc7668eb |
children | 327568ad9be9 |
rev | line source |
---|---|
9 | 1 #ifndef __core__filesystem_h |
2 #define __core__filesystem_h | |
11 | 3 #include <string> |
4 | |
5 namespace Filesystem { | |
6 | |
59
327e9a5c72f1
filesystem: add basename and stem functions
Paper <mrpapersonic@gmail.com>
parents:
45
diff
changeset
|
7 bool CreateDirectories(const std::string& path); |
327e9a5c72f1
filesystem: add basename and stem functions
Paper <mrpapersonic@gmail.com>
parents:
45
diff
changeset
|
8 bool Exists(const std::string& path); |
327e9a5c72f1
filesystem: add basename and stem functions
Paper <mrpapersonic@gmail.com>
parents:
45
diff
changeset
|
9 std::string Basename(const std::string& path); |
327e9a5c72f1
filesystem: add basename and stem functions
Paper <mrpapersonic@gmail.com>
parents:
45
diff
changeset
|
10 std::string Stem(const std::string& path); |
327e9a5c72f1
filesystem: add basename and stem functions
Paper <mrpapersonic@gmail.com>
parents:
45
diff
changeset
|
11 std::string GetParentDirectory(const std::string& path); |
45
4b05bc7668eb
filesystem: split config path into dotpath and config, add anime db path
Paper <mrpapersonic@gmail.com>
parents:
36
diff
changeset
|
12 std::string GetDotPath(); // %APPDATA%/minori, ~/Library/Application Support/minori, ~/.config/minori... |
4b05bc7668eb
filesystem: split config path into dotpath and config, add anime db path
Paper <mrpapersonic@gmail.com>
parents:
36
diff
changeset
|
13 std::string GetConfigPath(); // (dotpath)/config.json |
4b05bc7668eb
filesystem: split config path into dotpath and config, add anime db path
Paper <mrpapersonic@gmail.com>
parents:
36
diff
changeset
|
14 std::string GetAnimeDBPath(); // (dotpath)/anime/db.json |
11 | 15 |
36 | 16 } // namespace Filesystem |
11 | 17 |
18 #endif // __core__filesystem_h |