![]() |
Public API Reference |
Defines a simple memory-mapped IO class that is portable. More...
#include <csutil/mmapio.h>
Public Member Functions | |
| csMemoryMappedIO (char const *filename, iVFS *vfs=0) | |
| Block size is the size of blocks that you want to get from the file, filename is the name of the file to map. | |
| csRef< csMemoryMapping > | GetData (size_t offset, size_t length) |
| Obtain a piece of the mapped file. | |
| bool | IsValid () |
| Returns true the memory was mapped successfully. | |
| virtual | ~csMemoryMappedIO () |
| Destroys the mmapio object, closes open files, and releases memory. | |
| csMemoryMappedIO::csMemoryMappedIO | ( | char const * | filename, |
| iVFS * | vfs = 0 |
||
| ) |
Block size is the size of blocks that you want to get from the file, filename is the name of the file to map.
If you supply a VFS, filename is tried to be resolved to a native path. Otherwise, filename is used as is, hence it must already be a native path.
| virtual csMemoryMappedIO::~csMemoryMappedIO | ( | ) | [virtual] |
Destroys the mmapio object, closes open files, and releases memory.
| csRef<csMemoryMapping> csMemoryMappedIO::GetData | ( | size_t | offset, |
| size_t | length | ||
| ) |
Obtain a piece of the mapped file.
| bool csMemoryMappedIO::IsValid | ( | ) |
Returns true the memory was mapped successfully.