tango.io.device.Device

License:
BSD style:

Version:
May 2005: Initial release

author:
Kris

class Device: tango.io.device.Conduit.Conduit, tango.io.model.IConduit.ISelectable;
Implements a means of reading and writing a file device. Conduits are the primary means of accessing external data, and this one is used as a superclass for the console, for files, sockets etc.

alias error = error;
expose superclass definition also

final void error();
Throw an IOException noting the last error.

immutable(char)[] toString();
Return the name of this device.

const const size_t bufferSize();
Return a preferred size for buffering conduit I/O.

protected int handle;
Unix-specific code.

protected void reopen(Handle handle);
Allow adjustment of standard IO handles.

Unix-specific code.

final @property Handle fileHandle();
Return the underlying OS handle of this Conduit.

Unix-specific code.

void detach();
Release the underlying file.

Unix-specific code.

size_t read(void[] dst);
Read a chunk of bytes from the file into the provided array. Returns the number of bytes read, or Eof where there is no further data.

Unix-specific code.

size_t write(const(void)[] src);
Write a chunk of bytes to the file from the provided array. Returns the number of bytes written, or Eof if the output is no longer available.

Unix-specific code.


Page generated by Ddoc. Copyright (c) 2004 Kris Bell. All rights reserved