annotate include/core/filesystem.h @ 93:d5efb81540b3

statistics: add graph! also now we have a VERY VERY simple graph widget that probably sucks and doesn't work half the time :)
author Paper <mrpapersonic@gmail.com>
date Wed, 01 Nov 2023 13:52:34 -0400
parents 3d2decf093bb
children 39521c47c7a3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
1 #ifndef __core__filesystem_h
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
2 #define __core__filesystem_h
11
fc1bf97c528b *: use C++11 standard
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
3 #include <string>
fc1bf97c528b *: use C++11 standard
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
4
fc1bf97c528b *: use C++11 standard
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
5 namespace Filesystem {
fc1bf97c528b *: use C++11 standard
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
6
61
327568ad9be9 core/fs: finish class-ification of paths
Paper <mrpapersonic@gmail.com>
parents: 59
diff changeset
7 class Path {
63
3d2decf093bb *: fix many clang warnings
Paper <mrpapersonic@gmail.com>
parents: 61
diff changeset
8 public:
3d2decf093bb *: fix many clang warnings
Paper <mrpapersonic@gmail.com>
parents: 61
diff changeset
9 Path();
3d2decf093bb *: fix many clang warnings
Paper <mrpapersonic@gmail.com>
parents: 61
diff changeset
10 Path(const std::string& path);
3d2decf093bb *: fix many clang warnings
Paper <mrpapersonic@gmail.com>
parents: 61
diff changeset
11 Path(const Path& path);
3d2decf093bb *: fix many clang warnings
Paper <mrpapersonic@gmail.com>
parents: 61
diff changeset
12 bool CreateDirectories() const;
3d2decf093bb *: fix many clang warnings
Paper <mrpapersonic@gmail.com>
parents: 61
diff changeset
13 bool Exists() const;
3d2decf093bb *: fix many clang warnings
Paper <mrpapersonic@gmail.com>
parents: 61
diff changeset
14 std::string Basename() const;
3d2decf093bb *: fix many clang warnings
Paper <mrpapersonic@gmail.com>
parents: 61
diff changeset
15 std::string Stem() const;
3d2decf093bb *: fix many clang warnings
Paper <mrpapersonic@gmail.com>
parents: 61
diff changeset
16 std::string Extension() const;
3d2decf093bb *: fix many clang warnings
Paper <mrpapersonic@gmail.com>
parents: 61
diff changeset
17 Path GetParent() const;
3d2decf093bb *: fix many clang warnings
Paper <mrpapersonic@gmail.com>
parents: 61
diff changeset
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
3d2decf093bb *: fix many clang warnings
Paper <mrpapersonic@gmail.com>
parents: 61
diff changeset
21 private:
3d2decf093bb *: fix many clang warnings
Paper <mrpapersonic@gmail.com>
parents: 61
diff changeset
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
3d2decf093bb *: fix many clang warnings
Paper <mrpapersonic@gmail.com>
parents: 61
diff changeset
25 Path GetDotPath(); // %APPDATA%/minori, ~/Library/Application Support/minori, ~/.config/minori...
3d2decf093bb *: fix many clang warnings
Paper <mrpapersonic@gmail.com>
parents: 61
diff changeset
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
fc1bf97c528b *: use C++11 standard
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
28
36
2743011a6042 *: mass update
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
29 } // namespace Filesystem
11
fc1bf97c528b *: use C++11 standard
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
30
fc1bf97c528b *: use C++11 standard
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
31 #endif // __core__filesystem_h