Add metadata!
This commit is contained in:
30
src/temp_directory.hpp
Normal file
30
src/temp_directory.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef TEMP_DIRECTORY_HPP
|
||||
#define TEMP_DIRECTORY_HPP
|
||||
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
|
||||
namespace simple_object_storage {
|
||||
|
||||
// RAII helper for temporary directory cleanup
|
||||
class TempDirectory {
|
||||
public:
|
||||
TempDirectory(const std::string& prefix = "temp_");
|
||||
~TempDirectory();
|
||||
|
||||
// Disable copy/move semantics for simplicity
|
||||
TempDirectory(const TempDirectory&) = delete;
|
||||
TempDirectory& operator=(const TempDirectory&) = delete;
|
||||
TempDirectory(TempDirectory&&) = delete;
|
||||
TempDirectory& operator=(TempDirectory&&) = delete;
|
||||
|
||||
const std::filesystem::path& path() const;
|
||||
std::string string() const;
|
||||
|
||||
private:
|
||||
std::filesystem::path path_;
|
||||
};
|
||||
|
||||
} // namespace simple_object_storage
|
||||
|
||||
#endif // TEMP_DIRECTORY_HPP
|
Reference in New Issue
Block a user