storage::io(3)

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 con
sisting 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 ($Startup, $name, [,$mode [,_$stream_ buf]])
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 Startup object $Startup.

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, Startup

AUTHOR

Martin Schwartz <schwartz@cs.tu-berlin.de>
Copyright © 2010-2025 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout