This commit is contained in:
Your Name
2025-05-25 11:30:18 +12:00
parent 90b4946ce8
commit 52dcaada2d
6 changed files with 267 additions and 207 deletions

19
src/utils.hpp Normal file
View File

@@ -0,0 +1,19 @@
#pragma once
#include <filesystem>
#include <iostream>
namespace simple_object_storage {
// Simple RAII helper for file deletion
class ScopeFileDeleter {
public:
ScopeFileDeleter(const std::filesystem::path& path);
~ScopeFileDeleter();
void release();
private:
std::filesystem::path path_;
bool released_;
};
}