#pragma once #include #include #include #include #include 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{}; }; }