mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-10 17:01:17 +12:00
Add all the files
This commit is contained in:
parent
e3db07a16a
commit
d60742f52b
1445 changed files with 430238 additions and 0 deletions
27
src/config/PermanentStorage.h
Normal file
27
src/config/PermanentStorage.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
#pragma once
|
||||
|
||||
// disabled by config
|
||||
class PSDisabledException : public std::runtime_error
|
||||
{
|
||||
public:
|
||||
PSDisabledException()
|
||||
: std::runtime_error("permanent storage is disabled by user") {}
|
||||
};
|
||||
|
||||
class PermanentStorage
|
||||
{
|
||||
public:
|
||||
PermanentStorage();
|
||||
~PermanentStorage();
|
||||
|
||||
void ClearAllFiles() const;
|
||||
// flags storage to be removed on destruction
|
||||
void RemoveStorage();
|
||||
|
||||
void WriteStringToFile(std::string_view filename, std::string_view content);
|
||||
std::string ReadFile(std::string_view filename) noexcept;
|
||||
|
||||
private:
|
||||
fs::path m_storage_path;
|
||||
bool m_remove_storage = false;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue