This is an Object-Oriented interface to the GNU CD Input and Control library ("libcdio") which is written
in C. This class handles ISO 9660 tracks on a CD or in a CD-ROM.
Note that working with a CD in a CD-ROM which has tracks in the ISO-9660 format is distinct working with
a file in a filesystem which contains an ISO-9660 image. See also Device::Cdio::ISO9660::IFS for working
with an ISO 9660 image stored as a file in a filesystem.
CALLINGROUTINES
Routines accept named parameters as well as positional parameters. For named parameters, each argument
name is preceded by a dash. For example:
Device::Cdio::ISO9660::FS->new(-source=>'MYISO.CUE')
Each argument name is preceded by a dash. Neither case nor order matters in the argument list.
-driver_id, -Driver_ID, and -DRIVER_ID are all acceptable. In fact, only the first argument needs to
begin with a dash. If a dash is present in the first argument, we assume dashes for the subsequent
parameters.
In the documentation below and elsewhere in this package the parameter name that can be used in this
style of call is given in the parameter list. For example, for "close_tray" the documentation below
reads:
close_tray(drive=undef, driver_id=$perlcdio::DRIVER_UNKNOWN)
-> ($drc, $driver_id)
So the parameter names are "drive", and "driver_id". Neither parameter is required. If "drive" is not
specified, a value of "undef" will be used. And if "driver_id" is not specified, a value of
$perlcdio::DRIVER_UNKNOWN is used.
The older, more traditional style of positional parameters is also supported. So the "new" example from
above can also be written:
Device::Cdio::ISO9660::FS->new('MYISO.CUE')
Finally, since no parameter name can be confused with a an integer, negative values will not get confused
as a named parameter.
find_lsn
find_lsn(lsn)->$stat_href
Find the filesystem entry that contains LSN and return information about it. Undef is returned on error.
readdir
readdir(dirname)->@iso_stat
Read path (a directory) and return a list of iso9660 stat references
Each item of @iso_stat is a hash reference which contains
LSN the Logical sector number (an integer)
size
the total size of the file in bytes
sec_size
the number of sectors allocated
filename
the file name of the statbuf entry
XA if the file has XA attributes; 0 if not
is_dir
1 if a directory; 0 if a not;
FIXME: If you look at iso9660.h you'll see more fields, such as for Rock-Ridge specific fields or XA
specific fields. Eventually these will be added. Volunteers?
read_pvd
read_pvd()->pvd
Read the Super block of an ISO 9660 image. This is the Primary Volume Descriptor (PVD) and perhaps a
Supplemental Volume Descriptor if (Joliet) extensions are acceptable.
read_superblock
read_superblock(iso_mask=$libiso9660::EXTENSION_NONE)->bool
Read the Super block of an ISO 9660 image. This is the rimary Volume Descriptor (PVD) and perhaps a
Supplemental Volume Descriptor if (Joliet) extensions are acceptable.
stat
stat(path, translate=0)->\%stat
Return file status for path name psz_path. NULL is returned on error.
If translate is 1, version numbers in the ISO 9660 name are dropped, i.e. ;1 is removed and if level 1
ISO-9660 names are lowercased.
Each item of @iso_stat is a hash reference which contains
LSN the Logical sector number (an integer)
size
the total size of the file in bytes
sec_size
the number of sectors allocated
filename
the file name of the statbuf entry
XA if the file has XA attributes; 0 if not
is_dir
1 if a directory; 0 if a not;