29 lines
368 B
C++
29 lines
368 B
C++
#ifndef FILEWRITER_HPP
|
|
#define FILEWRITER_HPP
|
|
|
|
#include <stdio.h>
|
|
|
|
class FileWriter{
|
|
|
|
private:
|
|
|
|
FILE* fd;
|
|
|
|
public:
|
|
|
|
FileWriter(const char* path);
|
|
|
|
void write(const char* data, unsigned int length);
|
|
|
|
void reset();
|
|
|
|
void seekTo(unsigned int length);
|
|
|
|
unsigned int getCurrentFileSize();
|
|
|
|
~FileWriter();
|
|
|
|
};
|
|
|
|
#endif // FILEWRITER_H
|