Read and write memory mapped files.
MmFile objects control the memory mapped file resource.
The mode the memory mapped file is opened with.
Read existing file
Delete existing file, write new file
Read/Write existing file, create if not existing
Read/Write existing file, copy on write
Open memory mapped file filename for reading. File is closed when the object instance is deleted.
Open memory mapped file filename in mode. File is closed when the object instance is deleted.
string filename | name of the file. If null, an anonymous file mapping is created. |
Mode mode | access mode defined above. |
ulong size | the size of the file. If 0, it is taken to be the size of the existing file. |
void* address | the preferred address to map the file to, although the system is not required to honor it. If null, the system selects the most convenient address. |
size_t window | preferred block size of the amount of data to map at one time with 0 meaning map the entire file. The window size must be a multiple of the memory allocation page size. |
Gives size in bytes of the memory mapped file.
Read-only property returning the file mode.
Returns entire file contents as an array.
Returns slice of file contents as an array.
Returns byte at index i in file.
Sets and returns byte at index i in file to value.