www.digitalmars.com Home | Search | D | Comments
Last update Wed Mar 01 2006
D
Language
Phobos
Comparisons


object

std
 std.base64
 std.bitarray
 std.boxer
 std.compiler
 std.conv
 std.ctype
 std.date
 std.demangle
 std.file
 std.format
 std.gc
 std.intrinsic
 std.math
 std.md5
 std.mmfile
 std.openrj
 std.outbuffer
 std.path
 std.process
 std.random
 std.recls
 std.regexp
 std.socket
 std.socketstream
 std.stdint
 std.stdio
 std.cstream
 std.stream
 std.string
 std.system
 std.thread
 std.uni
 std.uri
 std.utf
 std.zip
 std.zlib

std.windows

std.linux

std.c
 std.c.stdio

std.c.windows

std.c.linux

std.cstream

The std.cstream module bridges std.c.stdio (or std.stdio) and std.stream. Both std.c.stdio and std.stream are publically imported by std.cstream.
class CFile : Stream
A Stream wrapper for a C file of type FILE*.

this(FILE* file, FileMode mode, bool seekable = false)
Create the stream wrapper for the given C file. The mode parameter is a bitwise combination of FileMode.In for a readable file and FileMode.Out for a writeable file. The seekable parameter indicates if the stream should be seekable.

~this()
Closes the stream

FILE* file
Property to get or sets the underlying file for this stream. Setting the file marks the stream as open.

void flush()
void close()
size_t readBlock(void* buffer, size_t size)
size_t writeBlock(void* buffer, size_t size)
ulong seek(long offset, SeekPos rel)
char getc()
char ungetc(char c)
bool eof()
void writeLine(char[] s)
void writeLineW(wchar[] s)
Overrides of the Stream methods to call the underlying FILE* C functions.
CFile din
CFile wrapper of std.c.stdio.stdin (not seekable).
CFile dout
CFile wrapper of std.c.stdio.stdout (not seekable).
CFile derr
CFile wrapper of std.c.stdio.stderr (not seekable).