Tidy
This commit is contained in:
19
src/utils.hpp
Normal file
19
src/utils.hpp
Normal 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_;
|
||||
};
|
||||
|
||||
}
|
Reference in New Issue
Block a user