FileMap

Constructors

this
this(cstring path, File.Style style)

Construct a FileMap upon the given path.

Members

Functions

close
void close()

Release external resources.

resize
ubyte[] resize(long size)

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

Inherited Members

From Array

toString
istring toString()

Return the name of this conduit.

read
size_t read(void[] dst)

Transfer content into the provided dst.

write
size_t write(const(void)[] src)

Emulate OutputStream.write().

bufferSize
size_t bufferSize()

Return a preferred size for buffering conduit I/O.

detach
void detach()

Release external resources.

seek
long seek(long offset, Anchor anchor)

Seek within the constraints of assigned content.

assign
Array assign(void[] data)

Reset the buffer content.

assign
Array assign(void[] data, size_t readable)

Reset the buffer content

assign
void[] assign()

Access buffer content.

opSlice
void[] opSlice(size_t start, size_t end)

Return a void[] read of the buffer from start to end, where end is exclusive.

slice
void[] slice()

Retrieve all readable content.

slice
void[] slice(size_t size, bool eat)

Access buffer content.

append
Array append(const(void)[] src)

Append content.

next
bool next(size_t delegate(const(void)[]) scan)

Iterator support.

readable
size_t readable()

Available content.

writable
size_t writable()

Available space.

limit
size_t limit()

Access buffer limit.

capacity
size_t capacity()

Access buffer capacity.

position
size_t position()

Access buffer read position.

clear
Array clear()

Clear array content.

flush
Array flush()

Emit/purge buffered content.

writer
size_t writer(size_t delegate(void[]) dg)

Write into this buffer.

reader
size_t reader(size_t delegate(const(void)[]) dg)

Read directly from this buffer.

Meta