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
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
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
fc1bf97c528b *: use C++11 standard
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
30
36
2743011a6042 *: mass update
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
31 } // namespace Filesystem
11
fc1bf97c528b *: use C++11 standard
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
32
fc1bf97c528b *: use C++11 standard
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
33 #endif // __core__filesystem_h