dont preview by default, Vault::delete_file
This commit is contained in:
@@ -11,6 +11,7 @@ constexpr u64 AFTER_HEADER_OFFSET = 6;
|
||||
struct FileHeader {
|
||||
std::string name;
|
||||
u64 size;
|
||||
u64 offset;
|
||||
};
|
||||
|
||||
class Vault {
|
||||
@@ -19,9 +20,12 @@ public:
|
||||
|
||||
std::vector<FileHeader> read_file_headers();
|
||||
std::optional<std::string> read_file(const std::string &name);
|
||||
void write_file(const std::string &name, const std::string &content);
|
||||
void create_file(const std::string &name, const std::string &content);
|
||||
void delete_file(const std::string &name);
|
||||
void update_file(const std::string &name, const std::string &content);
|
||||
|
||||
static std::optional<FileHeader> read_file_header(std::fstream &file);
|
||||
|
||||
private:
|
||||
std::string m_path;
|
||||
std::fstream m_file;
|
||||
|
||||
Reference in New Issue
Block a user