whio  whio_stream

ACHTUNG: AS OF 20110523, THIS PAGE IS NOW MAINTAINED IN THE NEW WIKI: http://whiki.wanderinghorse.net/wikis/whio/?page=whio_stream

whio_stream API

whio_stream is a C struct (declared in <wh/whio/whio_stream.h>) which defines an interface for basic sequential-access i/o operations.

whio_stream specifies only an interface, and instances of concrete implementations are created via various factory functions (declared in <wh/whio/whio_streams.h>). Unlike the whio_dev interface, streams typically provide either read-only or write-only access, but not both.

Implementations are provided for the following types of streams:

  • Local files, either by filename, FILE handle, or file descriptor.
  • A wrapper for any whio_dev object.

It is simple to create implementations for any type of device which provides facilities for sequential access. In doing so, any generic i/o algorithms, or code which uses whio_stream for its i/o, can use such client-supplied whio_stream implementations.

The whio_stream API is neither as large nor as flexible as the whio_dev API, but is suitable when simple sequential access is needed.