FileStream

File i/o stream

Constructors

this
this(File f, string[string] metadata, Endian e)
Undocumented in source.
this
this(string name, string mode, string[string] metadata, Endian e)

Class constructor

Destructor

~this
~this()
Undocumented in source.

Members

Functions

getContents
ubyte[] getContents()
Undocumented in source. Be warned that the author may not have intended to support it.
isEmpty
bool isEmpty()
Undocumented in source. Be warned that the author may not have intended to support it.
isReadable
bool isReadable()
Undocumented in source. Be warned that the author may not have intended to support it.
isSeekable
bool isSeekable()
Undocumented in source. Be warned that the author may not have intended to support it.
isWritable
bool isWritable()
Undocumented in source. Be warned that the author may not have intended to support it.
length
ssize_t length()
Undocumented in source. Be warned that the author may not have intended to support it.
read
ubyte read()
Undocumented in source. Be warned that the author may not have intended to support it.
read
ubyte[] read(size_t n)
Undocumented in source. Be warned that the author may not have intended to support it.
seek
ssize_t seek(sdiff_t pos, Seek origin)
Undocumented in source. Be warned that the author may not have intended to support it.
tell
ssize_t tell()
Undocumented in source. Be warned that the author may not have intended to support it.
write
void write(ubyte b)
Undocumented in source. Be warned that the author may not have intended to support it.
write
void write(ubyte[] b)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

tmpfile
FileStream tmpfile(string[string] metadata, Endian e)

Creates a temporary file stream

Static variables

READABLE
auto READABLE;
Undocumented in source.
WRITABLE
auto WRITABLE;
Undocumented in source.

Variables

f
File f;
Undocumented in source.
mode
string mode;
Undocumented in source.

Inherited Members

From Stream

endian
Endian endian;
Undocumented in source.
metadata
string[string] metadata;
Undocumented in source.
setEndian
void setEndian(Endian e)

Sets the stream endianness. Affects on the byte order during read and write units and ulongs.

getEndian
Endian getEndian()
length
ssize_t length()
tell
ssize_t tell()

Returns the current positon in the stream

isEmpty
bool isEmpty()
isSeekable
bool isSeekable()
seek
ssize_t seek(sdiff_t pos, Seek origin)

Sets the current position in the stream

isWritable
bool isWritable()
write
void write(ubyte b)

Writes an unsigned byte to the stream

write
void write(ubyte[] b)

Writes an array of unsigned bytes to the stream

isReadable
bool isReadable()
read
ubyte read()

Reads an unsigned byte from the stream

read
ubyte[] read(size_t n)

Reads an array of ubytes from the stream

getContents
ubyte[] getContents()

Reads entire stream as ubyte[] array

getMetadata
string getMetadata(string key)

Meta