2017-10-30 23:44:40 +01:00
|
|
|
#ifndef _LIBRW_FILEHANDLE_HPP_
|
|
|
|
#define _LIBRW_FILEHANDLE_HPP_
|
2015-02-26 04:57:28 +01:00
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Contains a pointer to a file's contents.
|
|
|
|
*/
|
2016-09-09 22:13:21 +02:00
|
|
|
struct FileContentsInfo {
|
|
|
|
char* data;
|
|
|
|
size_t length;
|
2015-02-26 04:57:28 +01:00
|
|
|
|
2016-09-09 22:13:21 +02:00
|
|
|
FileContentsInfo(char* mem, size_t len) : data(mem), length(len) {
|
|
|
|
}
|
2016-08-31 21:36:29 +02:00
|
|
|
|
2016-09-09 22:13:21 +02:00
|
|
|
~FileContentsInfo() {
|
|
|
|
delete[] data;
|
|
|
|
}
|
2015-02-26 04:57:28 +01:00
|
|
|
};
|
|
|
|
|
2016-08-31 21:29:39 +02:00
|
|
|
#endif
|