FileReader.hpp 698 B

123456789101112131415161718192021222324252627282930
  1. #ifndef CORE_FILE_READER_HPP
  2. #define CORE_FILE_READER_HPP
  3. #include "core/io/File.hpp"
  4. namespace Core {
  5. class FileReader final {
  6. void* file;
  7. Path path;
  8. public:
  9. FileReader();
  10. FileReader(const FileReader& other) = delete;
  11. FileReader(FileReader&& other);
  12. ~FileReader();
  13. FileReader& operator=(const FileReader& other) = delete;
  14. FileReader& operator=(FileReader&& other);
  15. const Path& getPath() const;
  16. Error open(const Path& path);
  17. Error open(const char* path);
  18. Error readChar(int& c);
  19. Error readChars(char* buffer, int bufferSize);
  20. void swap(FileReader& other);
  21. };
  22. }
  23. #endif