File

Encapsulates a FILE*.

Constructors

this
this(string filename, string mode)

Constructor

Destructor

~this
~this()

Destructor: frees all memory

Postblit

this(this)
this(this)

Constructor

Members

Functions

close
void close()

Closes the file stream

eof
bool eof()
error
bool error()

Checks the stream for errors

flush
bool flush()

Writes any unwritten data from the stream's buffer to the associated output device

length
size_t length()
opAssign
typeof(this) opAssign(typeof(this) rhs)

Ref. counting during structure assignment

opBinary
typeof(this) opBinary(T[] pos)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
typeof(this) opBinary(T b)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
typeof(this) opBinary(string str)
Undocumented in source. Be warned that the author may not have intended to support it.
opUnary
FILE* opUnary()
read
size_t read(void* ptr, size_t size, size_t nmemb)
size_t read(T[] buf)

Reads up to count objects into the array buffer

read
size_t read(T b)
Undocumented in source. Be warned that the author may not have intended to support it.
reopen
void reopen(string mode)

Reuses stream to change its access mode.

seek
bool seek(size_t offset, int origin)

Sets the file position indicator

stream
FILE* stream()
write
size_t write(void* ptr, size_t size, size_t nmemb)
size_t write(T[] buf)

Writes up to count binary objects from the given array buffer

write
size_t write(T b)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

seekCur
enum seekCur;

Offset is relative to the current position

seekEnd
enum seekEnd;

Offset is relative to the end

seekSet
enum seekSet;

Offset is relative to the beginning

Static functions

tmpfile
typeof(this) tmpfile()

Creates a temporary file without a name

Meta