Ion
|
Read-only in-memory view of an entire file on disk. More...
#include "memorymappedfile.h"
Public Member Functions | |
MemoryMappedFile (const std::string &path) | |
Maps the file at path . More... | |
~MemoryMappedFile () | |
const void * | GetData () const |
Returns a pointer to the head of the mapped region. More... | |
size_t | GetLength () const |
Returns the length of the mapped region. More... | |
Read-only in-memory view of an entire file on disk.
Definition at line 31 of file memorymappedfile.h.
|
explicit |
Maps the file at path
.
In case of error GetData() will be NULL. Mappings start at offset 0, extend the length of the file, and are read-only.
Definition at line 36 of file memorymappedfile.cc.
References handle.
ion::port::MemoryMappedFile::~MemoryMappedFile | ( | ) |
Definition at line 73 of file memorymappedfile.cc.
const void * ion::port::MemoryMappedFile::GetData | ( | ) | const |
Returns a pointer to the head of the mapped region.
Definition at line 85 of file memorymappedfile.cc.
size_t ion::port::MemoryMappedFile::GetLength | ( | ) | const |
Returns the length of the mapped region.
Definition at line 89 of file memorymappedfile.cc.