libnative-utilities/include/utils/FileReader.hpp
2024-08-15 18:40:30 +08:00

34 lines
508 B
C++

#ifndef FILEREADER_HPP
#define FILEREADER_HPP
#include <stdio.h>
class FileReader{
private:
FILE* fd;
unsigned int length;
public:
FileReader(const char* path);
void readFully(char* buffer, unsigned int length);
unsigned int read(char* buffer, unsigned int count);
unsigned int isEOF();
void reset();
void seekTo(unsigned int index);
unsigned int getFileLength();
~FileReader();
};
#endif // FILEREADER_H