BufferedFile

This subclass is for buffered file system streams.

It is a convenience class for wrapping a File in a BufferedStream. A buffered stream must be closed explicitly to ensure the final buffer content is written to the file.

Constructors

this
this()

opens file for reading

this
this(string filename, FileMode mode, size_t bufferSize)

opens file in requested mode and buffer size

this
this(File file, size_t bufferSize)

opens file for reading with requested buffer size

this
this(HANDLE hFile, FileMode mode, size_t buffersize)

opens existing handle; use with care!

Members

Functions

create
void create(string filename, FileMode mode)

creates file in requested mode

open
void open(string filename, FileMode mode)

opens file in requested mode

Inherited Members

From BufferedStream

buffer
ubyte[] buffer;
Undocumented in source.
bufferCurPos
size_t bufferCurPos;
Undocumented in source.
bufferLen
size_t bufferLen;
Undocumented in source.
bufferDirty
bool bufferDirty;
Undocumented in source.
bufferSourcePos
size_t bufferSourcePos;
Undocumented in source.
streamPos
ulong streamPos;
Undocumented in source.
DefaultBufferSize
enum size_t DefaultBufferSize;
Undocumented in source.
resetSource
void resetSource()
Undocumented in source. Be warned that the author may not have intended to support it.
readBlock
size_t readBlock(void* result, size_t len)
Undocumented in source. Be warned that the author may not have intended to support it.
writeBlock
size_t writeBlock(void* result, size_t len)
Undocumented in source. Be warned that the author may not have intended to support it.
seek
ulong seek(long offset, SeekPos whence)
Undocumented in source. Be warned that the author may not have intended to support it.
TreadLine
template TreadLine(T)
Undocumented in source.
readLine
char[] readLine(char[] inBuffer)
Undocumented in source. Be warned that the author may not have intended to support it.
readLine
alias readLine = Stream.readLine
Undocumented in source.
readLineW
wchar[] readLineW(wchar[] inBuffer)
Undocumented in source. Be warned that the author may not have intended to support it.
readLineW
alias readLineW = Stream.readLineW
Undocumented in source.
flush
void flush()
Undocumented in source.
eof
bool eof [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
size
ulong size [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
available
size_t available [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Meta