comparison include/core/filesystem.h @ 63:3d2decf093bb

*: fix many clang warnings
author Paper <mrpapersonic@gmail.com>
date Sun, 01 Oct 2023 06:39:47 -0400
parents 327568ad9be9
children 39521c47c7a3
comparison
equal deleted inserted replaced
62:4c6dd5999b39 63:3d2decf093bb
3 #include <string> 3 #include <string>
4 4
5 namespace Filesystem { 5 namespace Filesystem {
6 6
7 class Path { 7 class Path {
8 public: 8 public:
9 Path(); 9 Path();
10 Path(const std::string& path); 10 Path(const std::string& path);
11 Path(const Path& path); 11 Path(const Path& path);
12 bool CreateDirectories() const; 12 bool CreateDirectories() const;
13 bool Exists() const; 13 bool Exists() const;
14 std::string Basename() const; 14 std::string Basename() const;
15 std::string Stem() const; 15 std::string Stem() const;
16 std::string Extension() const; 16 std::string Extension() const;
17 Path GetParent() const; 17 Path GetParent() const;
18 void SetPath(const std::string& path); 18 void SetPath(const std::string& path);
19 std::string GetPath() const; 19 std::string GetPath() const;
20 20
21 private: 21 private:
22 std::string _path; 22 std::string _path;
23 }; 23 };
24 24
25 Path GetDotPath(); // %APPDATA%/minori, ~/Library/Application Support/minori, ~/.config/minori... 25 Path GetDotPath(); // %APPDATA%/minori, ~/Library/Application Support/minori, ~/.config/minori...
26 Path GetConfigPath(); // (dotpath)/config.json 26 Path GetConfigPath(); // (dotpath)/config.json
27 Path GetAnimeDBPath(); // (dotpath)/anime/db.json 27 Path GetAnimeDBPath(); // (dotpath)/anime/db.json
28 28
29 } // namespace Filesystem 29 } // namespace Filesystem
30 30
31 #endif // __core__filesystem_h 31 #endif // __core__filesystem_h