std.mmfile
Read and write memory mapped files.
Classes
MmFile
:
Object
MmFile objects control the memory mapped file resource.
Super hierarchy:
Object
->
MmFile
Constructors
this
(
char
[]
filename
)
Open memory mapped file filename for reading. File is closed when the object instance is deleted.
Throws:
std.file.FileException
Methods
void
flush
()
ulong
length
()
Gives size in bytes of the memory mapped file.
Mode
mode
()
Read-only property returning the file mode.
ubyte
opIndex
(
ulong
i
)
Returns byte at index i in file.
ubyte
opIndexAssign
(
ubyte
value
,
ulong
i
)
Sets and returns byte at index i in file to value.
void
[]
opSlice
()
Returns entire file contents as an array.
Inherited methods
from
Object
:
factory
,
notifyRegister
,
notifyUnRegister
,
opCmp
,
opEquals
,
print
,
toHash
,
toString
Enums
Mode
:
int
The mode the memory mapped file is opened with.
Read
read existing file
ReadCopyOnWrite
read/write existing file, copy on write
ReadWrite
read/write existing file, create if not existing
ReadWriteNew
delete existing file, write new file