IOMedia
Abstract: The IOMedia class is a random-access disk device abstraction.
The IOMedia class is a random-access disk device abstraction. It provides a
consistent interface for both real and virtual disk devices, for subdivisions
of disks such as partitions, for supersets of disks such as RAID volumes, and
so on. It extends the IOStorage class by implementing the appropriate open,
close, read, write, and matching semantics for media objects. The properties
it has reflect the properties of real disk devices, such as ejectability and
writability.
*
The read and write interfaces support byte-level access to the storage space,
with the appropriate deblocking handled by IODrive, however, a typical client
will want to obtain the natural block size in order to optimize access to the
real disk device. A read or write is accepted so long as the client's access
is valid, the media is formatted and the transfer is within the bounds of the
media. An optional non-zero base (offset) is then applied before the read or
write is passed to provider object.
*
An open is accepted so long as no more than one writer is active at any time.
© 2000 Apple Computer, Inc. (Last Updated 2/23/2000)