21 lines
375 B
C++
21 lines
375 B
C++
#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_;
|
|
};
|
|
|
|
std::string trim(const std::string& s);
|
|
|
|
} |