Fairport
v1.0.38
|
A generic class to read and write to a file. More...
#include <util.h>
Public Member Functions | |
file (const std::wstring &filename) | |
Construct a file object from the given filename. | |
~file () | |
Close the file. | |
size_t | read (std::vector< byte > &buffer, ulonglong offset) const |
Read from the file. |
A generic class to read and write to a file.
This was necessary to get around the 32 bit limit (4GB) file size limitation in ANSI C++. I needed to use compiler specific work arounds, and that logic is centralized here.
fairport::file::file | ( | const std::wstring & | filename | ) | [inline] |
Read from the file.
out_of_range | if the requested location or location+size is past EOF |
[in,out] | buffer | The buffer to store the data in. The size of this vector is the amount of data to read. |
[in] | offset | The location on disk to read the data from. |