iz.streams

iz streams, standard streams implementation with several extention related to D ranges.

Members

Classes

FileStream
class FileStream

System stream specialized into reading and writing files, including huge ones (up to 2^64 bytes). Several constructors are avalaible with predefined options.

MemoryStream
class MemoryStream

Implements a stream of contiguous, GC-free, heap-memory.

SystemStream
class SystemStream

Base Stream for a descendant that uses the operating system API.

Enums

SeekMode
enum SeekMode

Enumerates the Stream seek modes.

Functions

cmToSystem
int cmToSystem(int aCreationMode)

translates a cmXX to a platform specific option.

cmToSystem
int cmToSystem(int aCreationMode)

translates a cmXX to a platform specific option.

copyStream
void copyStream(Stream source, Stream target)

Copies the content of a Stream to another one.

decodeLine
auto decodeLine(Stream str)

Decodes an UTF8 line from a Stream.

genReadWriteVar
string genReadWriteVar()

Generates all the typed write() and read() of a Stream implementation.

isHandleValid
bool isHandleValid(StreamHandle aHandle)

returns true if aHandle is valid.

isHandleValid
bool isHandleValid(StreamHandle aHandle)

returns true if aHandle is valid.

read
void read(Stream str, void[] value)

Reads any D array, or a D style chunck from a Stream.

readArray
void readArray(Stream str, ref T t)

Reads an unidimensional array from a stream.

readln
const(char)[] readln(Stream str)

Reads a line in a Stream, without decoding.

streamRange
auto streamRange(ST st)

Helper designed to construct a new StreamRange allocated on the C heap.

write
void write(Stream str, const(void)[] value)

Writes any D array, or a D style chunck in a Stream.

writeArray
void writeArray(Stream str, auto ref T t)

Writes an unidimensional array in a stream.

writeRange
void writeRange(Stream target, R r)

Writes an input range to a stream.

Interfaces

FilePersist8
interface FilePersist8

An implementer can save to and load from a file with a UTF8 file name.

Stream
interface Stream

Defines the members of a Stream.

StreamPersist
interface StreamPersist

An implementer can save to and load from a Stream.

Structs

StreamRange
struct StreamRange(ST, T)

Input, forward and bidirectional range for a Stream.

Variables

acAll
uint acAll;

defines the FileStream access modes.

acRead
uint acRead;

defines the FileStream access modes.

acRead
uint acRead;

access modes.

acWrite
uint acWrite;

defines the FileStream access modes.

cmAlways
int cmAlways;

FileStream creation mode 'Always': creates if not exists otherwise open.

cmNotThere
int cmNotThere;

FileStream creation mode 'NotThere': creates only if not exists.

cmThere
int cmThere;

FileStream creation mode 'There': opens only if exists.

pdIn
uint pdIn;

pipe direction

shAll
int shAll;

defines the FileStream share modes.

shNone
int shNone;

defines the FileStream share modes.

shNone
int shNone;

share modes. (does not allow execution)

shRead
int shRead;
shWrite
int shWrite;

defines the FileStream share modes.

Meta