1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-05 19:45:33 +00:00
openmw/components/platform/file.hpp

35 lines
636 B
C++

#ifndef OPENMW_COMPONENTS_PLATFORM_FILE_HPP
#define OPENMW_COMPONENTS_PLATFORM_FILE_HPP
#include <cstdlib>
#include <string_view>
namespace Platform::File {
enum class Handle : intptr_t
{
Invalid = -1
};
enum class SeekType
{
Begin,
Current,
End
};
Handle open(const char* filename);
void close(Handle handle);
size_t size(Handle handle);
void seek(Handle handle, size_t Position, SeekType type = SeekType::Begin);
size_t tell(Handle handle);
size_t read(Handle handle, void* data, size_t size);
}
#endif // OPENMW_COMPONENTS_PLATFORM_FILE_HPP