1 #ifndef COMPONENTS_FILES_LOWLEVELFILE_HPP
2 #define COMPONENTS_FILES_LOWLEVELFILE_HPP
6 #define FILE_API_STDIO 0
7 #define FILE_API_POSIX 1
8 #define FILE_API_WIN32 2
10 #if defined(__linux) || defined(__unix) || defined(__posix)
11 #define FILE_API FILE_API_POSIX
13 #define FILE_API FILE_API_WIN32
15 #define FILE_API FILE_API_STDIO
18 #if FILE_API == FILE_API_STDIO
20 #elif FILE_API == FILE_API_POSIX
21 #elif FILE_API == FILE_API_WIN32
24 #error Unsupported File API
34 void open (
char const * filename);
39 void seek (
size_t Position);
42 size_t read (
void * data,
size_t size);
45 #if FILE_API == FILE_API_STDIO
47 #elif FILE_API == FILE_API_POSIX
49 #elif FILE_API == FILE_API_WIN32
Definition: lowlevelfile.hpp:27
void close()
Definition: lowlevelfile.cpp:47
void seek(size_t Position)
Definition: lowlevelfile.cpp:79
size_t size()
Definition: lowlevelfile.cpp:56
size_t read(void *data, size_t size)
Definition: lowlevelfile.cpp:99
size_t tell()
Definition: lowlevelfile.cpp:87
~LowLevelFile()
Definition: lowlevelfile.cpp:27
void open(char const *filename)
Definition: lowlevelfile.cpp:33
FILE * mHandle
Definition: lowlevelfile.hpp:46
LowLevelFile()
Definition: lowlevelfile.cpp:22