The OpenD Programming Language

MmFile

MmFile objects control the memory mapped file resource.

Constructors

this
this(string filename)

Open memory mapped file filename for reading. File is closed when the object instance is deleted.

this
this(string filename, Mode mode, ulong size, void* address, size_t window)

Open memory mapped file filename in mode. File is closed when the object instance is deleted.

Destructor

~this
~this()

Flushes pending output and closes the memory mapped file.

Members

Aliases

opDollar
alias opDollar = length

Forwards length.

Enums

Mode
enum Mode

The mode the memory mapped file is opened with.

Functions

mode
Mode mode()

Read-only property returning the file mode.

opIndex
ubyte opIndex(ulong i)

Returns byte at index i in file.

opIndexAssign
ubyte opIndexAssign(ubyte value, ulong i)

Sets and returns byte at index i in file to value.

opSlice
void[] opSlice()

Returns entire file contents as an array.

opSlice
void[] opSlice(ulong i1, ulong i2)

Returns slice of file contents as an array.

Properties

length
ulong length [@property getter]

Gives size in bytes of the memory mapped file.

Meta