1234567891011121314151617181920212223242526272829303132 |
- #ifndef CORE_FILE_READER_HPP
- #define CORE_FILE_READER_HPP
- #include "io/File.hpp"
- namespace Core {
- using Path = String8<PATH_MAX>;
- class FileReader final {
- void* file;
- Path path;
- public:
- FileReader();
- FileReader(const FileReader& other) = delete;
- FileReader(FileReader&& other);
- ~FileReader();
- FileReader& operator=(const FileReader& other) = delete;
- FileReader& operator=(FileReader&& other);
- const Path& getPath() const;
- Error open(const Path& path);
- Error open(const char* path);
- Error readChar(int& c);
- Error readChars(char* buffer, int bufferSize);
- void swap(FileReader& other);
- };
- }
- #endif
|