IODev.this - multiple declarations

Function IODev.this

Construct an input stream based on the file descriptor

this (
  int fd,
  bool closeOnDestroy = true
);

params

fd = The file descriptor to wrap closeOnDestroy = If set to true, the destructor will close the file descriptor. This does not affect the operation of close.

Function IODev.this

Construct an input stream based on a FILE *. The only difference between this and the fd version is the close routine will close the FILE * if valid.

this (
  shared(core.stdc.stdio.__sFILE)* fstream,
  bool closeOnDestroy = true
);

params

fstream = The FILE * instance to use for initialization. closeOnDestroy = If set to true, the destructor will close the file descriptor. This does not affect the operation of close.

Function IODev.this

Open a file. the specification for mode is identical to the linux man page for fopen

this (
  const(char[]) name,
  const(char[]) mode = "rb"
);