NAME

OLE::Storage::Io - Laola's IO interface

SYNOPSIS

use OLE::Storage::Io();

s.b.

DESCRIPTION

Note: OLE::Storage is doing IO by maintaining lists consisting of ($offset, $length) elements.

close

1||O == $Io -> close ([\$streambuf])

Destructor. Flushes cache and closes file.

flush

1 == $Io -> flush ()

Flush $Io cache, if caching is turned on.

name

$name = $Io -> name ()

Returns name of $Io.

open

$Io||O == open ($Error, $name, [,$mode [,\$streambuf]])

Constructor. Gives access to a file or a buffer. Default $mode is 0, that is read only. In file mode $name is a filepath. In buffer mode a reference to a buffer \$streambuf is mandatory. Errors occuring at Io methods will be reported to OLE::Storage::Error object $Error.

Bit	Mode
0	0 read only	1 read/write
4	0 file mode	1 buffer mode
read

1||O == $Io -> read ($offset, $len, \$buf [,$var_offset])

Reads $len bytes starting at offset $offset into buffer referenced by \$buf. If $var_offset is given, buffer will be filled from this offset on.

rw_iolist

1||0 == $Io -> rw_iolist ("r"||"w", \$buf, $iolistO);

Read Iolist $Io into buffer $buf ("r"), or write buffer to Iolist $Io.

size

$len = $Io -> size ()

Returns size of $Io in bytes.

writable

1||O == $Io -> writable ()

$Io is writable (1) or not (0).

write

1||O == $Io -> write ($offset, $len, \$buf [,$var_offset])

Writes $len bytes starting at offset $offset from buffer referenced by \$buf to $Io. If $var_offset is given, buffer will be read from this offset on.

SEE ALSO

OLE::Storage::Iolist, OLE::Storage::Error

AUTHOR

Martin Schwartz <schwartz@cs.tu-berlin.de>