MappedFile

Constructors

this
this(const(char[]) path, File.Style style)

Construct a FileMap upon the given path.

Members

Functions

close
void close()

Release this mapping without flushing.

close
void close()

Release this mapped buffer without flushing.

flush
MappedFile flush()

Flush dirty content out to the drive. This fails with error 33 if the file content is virgin. Opening a file for ReadWriteExists followed by a flush() will cause this.

flush
MappedFile flush()

Flush dirty content out to the drive.

resize
ubyte[] resize(long size)

Resize the file and return the remapped content. Usage of map() is not required following this call.

Properties

length
long length [@property getter]
map
ubyte[] map [@property getter]

Return a slice representing file content as a memory-mapped array.

map
ubyte[] map [@property getter]

Return a slice representing file content as a memory-mapped array. Use this to remap content each time the file size is changed.

path
const(char)[] path [@property getter]

Meta