Last update April 14, 2006

Phobos /
Memory Mapped File Class

std.mmfile - A platform-independent memory-mapped file class

Author/Contact: Matthew Wilson (, stlsoft ^at^ hotmail ^dot^ com)

Project Page: None at the moment.

Download URL: None. This will be included in the next release of Phobos.

Mailing list: None.


D + C implementation of an auto class MmFile to memory-map files. It provides the following interface:

// Member types

    enum Access { read, write };

// Construction

    this(char[] fileName);

this(char[] fileName, uint sizeToMap, Access access);

this(char[] fileName, uint sizeToMap, uint offset, Access access);

this(uint tempSize);

~this(); // Calls close

// Methods
    void flush();

// Operators

    byte opIndex(uint offset);

byte opIndex(uint offset, byte value);

byte[] opSlice();

byte[] opSlice(uint from, uint to);

// Properties

    uint Length();

Status: Win32 and Linux versions implemented. Waiting for Walter's inclusion in next Phobos.

In need of help?: Not at this stage, although comment on the class will be welcome.

Other People Comments:

FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: April 14, 2006 19:28 (diff))