D Programming Language
Report a bug If you spot a problem with this page, click here to create a Bugzilla issue. Improve this page Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

# std.cstream

Deprecated: This module is considered out-dated and not up to Phobos' current standards. It will be remove in October 2016.
The std.cstream module bridges core.stdc.stdio (or std.stdio) and std.stream. Both core.stdc.stdio and std.stream are publicly imported by std.cstream.
License:
Boost License 1.0.
Authors:
Ben Hinkle

Source: std/cstream.d

class CFile: std.stream.Stream;
  A Stream wrapper for a C file of type FILE*.
  this(FILE* cfile, FileMode mode, bool seekable = false);
    Create the stream wrapper for the given C file.
    Parameters:

    FILE* cfile | a valid C FILE pointer to wrap.
    FileMode mode | a bitwise combination of FileMode.In for a readable file and FileMode.Out for a writeable file.
    bool seekable | indicates if the stream should be seekable.

  @property FILE* file();
  @property void file(FILE* cfile);
    Property to get or set the underlying file for this stream. Setting the file marks the stream as open.
  void flush();
  void close();
  bool eof();
  char getc();
  char ungetc(char c);
  size_t readBlock(void* buffer, size_t size);
  size_t writeBlock(const void* buffer, size_t size);
  ulong seek(long offset, SeekPos rel);
  void writeLine(const(char)[] s);
  void writeLineW(const(wchar)[] s);
    Overrides of the Stream methods to call the underlying FILE* C functions.
CFile din;
  CFile wrapper of core.stdc.stdio.stdin (not seekable).
CFile dout;
  CFile wrapper of core.stdc.stdio.stdout (not seekable).
CFile derr;
  CFile wrapper of core.stdc.stdio.stderr (not seekable).

Copyright Ben Hinkle 2007 - 2009. | Page generated by Ddoc on Thu Dec 3 01:39:46 2015