2013-01-01 23:07:33 +00:00
|
|
|
#ifndef COMPONENTS_FILES_LOWLEVELFILE_HPP
|
|
|
|
#define COMPONENTS_FILES_LOWLEVELFILE_HPP
|
|
|
|
|
2013-01-04 22:12:56 +00:00
|
|
|
#include <cstdlib>
|
2022-07-16 17:37:19 +00:00
|
|
|
#include <memory>
|
2013-01-04 22:12:56 +00:00
|
|
|
|
2022-07-16 17:37:19 +00:00
|
|
|
#include <components/platform/file.hpp>
|
2013-01-01 23:07:33 +00:00
|
|
|
|
|
|
|
class LowLevelFile
|
|
|
|
{
|
|
|
|
public:
|
2022-07-16 17:37:19 +00:00
|
|
|
~LowLevelFile();
|
2013-01-01 23:07:33 +00:00
|
|
|
|
2022-07-16 17:37:19 +00:00
|
|
|
void open(char const* filename);
|
|
|
|
void close();
|
2013-01-01 23:07:33 +00:00
|
|
|
|
2022-07-16 17:37:19 +00:00
|
|
|
size_t size();
|
2013-01-01 23:07:33 +00:00
|
|
|
|
2022-07-16 17:37:19 +00:00
|
|
|
void seek(size_t Position);
|
|
|
|
size_t tell();
|
2013-01-01 23:07:33 +00:00
|
|
|
|
2022-07-16 17:37:19 +00:00
|
|
|
size_t read(void* data, size_t size);
|
2013-01-01 23:07:33 +00:00
|
|
|
|
|
|
|
private:
|
2022-07-16 17:37:19 +00:00
|
|
|
Platform::File::Handle mHandle{ Platform::File::Handle::Invalid };
|
2013-01-01 23:07:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|