staging some future refactoring, .h -> hpp, fix for rendering w/ audio
This commit is contained in:
22
src/util/file_.hpp
Normal file
22
src/util/file_.hpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
namespace anm2ed::util
|
||||
{
|
||||
class File
|
||||
{
|
||||
public:
|
||||
File() = default;
|
||||
File(const std::filesystem::path&, const char* mode);
|
||||
~File();
|
||||
|
||||
bool open(const std::filesystem::path&, const char* mode);
|
||||
int close();
|
||||
FILE* get() const;
|
||||
explicit operator bool() const;
|
||||
|
||||
private:
|
||||
FILE* handle{};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user