Initial commit

This commit is contained in:
gaztin committed 2026-07-11 19:53:00 +02:00
commit d1890b6e18
16 files changed
+702

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
#pragma once
#include <concepts>
#include <cstdio>
#include <filesystem>
#include <string>
#include <type_traits>
namespace core {
class file_stream
{
public:
file_stream(const file_stream&) = delete;
file_stream& operator=(const file_stream&) = delete;
file_stream(file_stream&&) noexcept;
file_stream& operator=(file_stream&&);
~file_stream();
static file_stream open_for_reading(const std::filesystem::path& file_path);
static std::string file_contents_as_string(const std::filesystem::path& file_path);
std::string read_all_as_string();
void close();
private:
file_stream() = default;
FILE* m_file_handle{};
};
}