annotate include/core/filesystem.h @ 122:bc218c9d2ea6

strings: convert ToInt() to be a template ini: conform to new strings.cc changes
author Paper <mrpapersonic@gmail.com>
date Wed, 08 Nov 2023 21:36:09 -0500
parents 39521c47c7a3
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