FileStream

A stream that reads/writes to a file

Constructors

this
this(File file)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

close
void close()
Undocumented in source. Be warned that the author may not have intended to support it.
flush
void flush()
Undocumented in source. Be warned that the author may not have intended to support it.
peek
int peek(ubyte[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
read
int read(ubyte[] buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
read
int read(size_t amount, ubyte[] buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
rewind
void rewind()
Undocumented in source. Be warned that the author may not have intended to support it.
seek
void seek(long position, StreamOrigin origin)
Undocumented in source. Be warned that the author may not have intended to support it.
tell
ulong tell()
Undocumented in source. Be warned that the author may not have intended to support it.
write
void write(ubyte[] buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
write
void write(ubyte[] buffer, size_t start)
Undocumented in source. Be warned that the author may not have intended to support it.
write
void write(ubyte[] buffer, size_t start, size_t length)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

canRead
bool canRead [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
canSeek
bool canSeek [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
canTell
bool canTell [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
canWrite
bool canWrite [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
eof
bool eof [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
knowsLength
bool knowsLength [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
length
size_t length [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From Stream

position
size_t position [@property getter]

Gets the position of the stream

canRead
bool canRead [@property getter]

Gets wether the stream can be read from

canWrite
bool canWrite [@property getter]

Gets wether the stream can be written to

canSeek
bool canSeek [@property getter]

Gets wether the stream is seekable

canTell
bool canTell [@property getter]

Gets wether the stream is tellable

knowsLength
bool knowsLength [@property getter]

Gets wether the stream knows its length

length
size_t length [@property getter]

Gets the length of the stream (if possible)

eof
bool eof [@property getter]

Gets wether the end has been reached

read
int read(ubyte[] buffer)

Reads the specified amount out to the buffer

read
int read(size_t amount, ubyte[] buffer)

Reads the specified amount out to the buffer

peek
int peek(ubyte[] data)

Peek the X amount of bytes from the current position

write
void write(ubyte[] buffer)

Writes the buffer to the stream

write
void write(ubyte[] buffer, size_t start)

Writes the buffer to the stream from the start position

write
void write(ubyte[] buffer, size_t start, size_t length)

Writes the buffer to the stream from the start position to the specified length

seek
void seek(long position, StreamOrigin origin)

Seek to a specified position in the stream

tell
ulong tell()

Returns the position of the stream the cursor is at

flush
void flush()

Flushes and syncronizes the stream

rewind
void rewind()

Seeks back to start of stream

close
void close()

Closes the stream

Meta