Device...ISO9660(3pm)
πΏ Device::Cdio::ISO9660 β the 3pm girlie of ISO 9660 handling πΏ
okay so bestie, welcome to Device::Cdio::ISO9660, the User Contributed Perl Documentation page for the module that does ISO 9660 handling. It's giving "I know everything about CD filesystem internals and I'm gonna hold your hand through it." π«Ά
β¨ NAME β¨
Device::Cdio::ISO9660 β Module for ISO 9660 handling. That's it, that's the whole name. Iconic. π
πΈ SYNOPSIS πΈ
So this lil guy encapsulates IS9660 filesystem handling (yes, it says IS9660, that's literally what it says, I do not make the rules π). But here's the tea: this library needs to be used in conjunction with Device::Cdio, Device::Cdio::ISO9660::IFS and Device::Cdio::ISO9660::FS. It does not ride solo, it's a group project fr fr.
use Device::Cdio::ISO9660;
$name = Device::Cdio::ISO9660::name_translate('COPYING.;1');
$bool = Device::Cdio::ISO9660::is_achar('A');
Look at that. Two lines. Ate and left no crumbs. β¨
π¦ DESCRIPTION π¦
This is an Object-Oriented Perl interface to the GNU CD Input and Control library's ISO 9660 library, libiso9660. Very demure, very mindful, very libiso9660.
The encapsulation happens in two parts, bestie, keep up:
- The lower-level Perl interface is called perliso9660 and it is generated by SWIG. (SWIG said "I'll handle the C, you handle the vibes.")
- The more object-oriented package is Device::Cdio::ISO9660 and it uses
perliso9660.
And now the plot twist π«’: actually, there are no objects in Device::Cdio::ISO9660. None. Zero. Nada. But there are objects in its sub packages Device::Cdio::ISO9660::IFS, Device::Cdio::ISO9660::FS (and in the future Device::Cdio::ISO9660::PVD β she's coming, we're waiting patiently π).
Although perliso9660 is perfectly usable on its own, it is expected that this module and these classes are what most people will use. And since perliso9660 more closely models the C interface, it is conceivable β if unlikely β that die-hard libiso9660 C users who are very familiar with that interface could prefer that one. Respect to them honestly, main character energy in a different genre. π
π¬ CALLING ROUTINES π¬
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::is_achar(-achar=>'M')
Each argument name is preceded by a dash. Neither case nor order matters in the argument list. -achar, -AChar, and -ACHAR are all acceptable β it's not picky, we love a flexible king. 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. The dashes simply carry the vibe forward, periodt.
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 name_translate the documentation below reads:
name_translate(name, joliet_level=0) -> $str
So the parameter names are name and joliet_level. Only the name parameter is required. If joliet_level is not specified, a value of 0 will be used. The return value is a string.
The older, more traditional style of positional parameters is also supported, which is shown in the synopsis above. Retro but make it cute. π
Finally: since no parameter name can be confused with a an integer, negative values will not get confused as a named parameter. No cap. π§
π SUBROUTINES π
π dirname_valid_p
dirname_valid_p(path)->bool
Check that path is a valid ISO-9660 directory name.
A valid directory name should not start out with a slash (/), dot (.) or null byte, should be less than 37 characters long, have no more than 8 characters in a directory component which is separated by a /, and consist of only DCHARs.
True is returned if path is valid. Slay.
π is_achar
is_dchar(achar)->bool
Return 1 if $achar is an ACHAR. $achar should either be a string of length one or the ord() of a string of length 1.
These are the DCHAR's plus some ASCII symbols including the space symbol. A little bougie, a little extra. β¨
π is_dchar
is_dchar(dchar)->bool
Return 1 if $dchar is a DCHAR β a character that can appear in an an ISO-9600 level 1 directory name. These are the ASCII capital letters A-Z, the digits 0-9 and an underscore.
$dchar should either be a string of length one or the ord() of a string of length 1.
π pathname_valid_p
pathname_valid_p(path)->bool
Check that path is a valid ISO-9660 pathname.
A valid pathname contains a valid directory name, if one appears, and the filename portion should be no more than 8 characters for the file prefix and 3 characters in the extension (or portion after a dot). There should be exactly one dot somewhere in the filename portion and the filename should be composed of only DCHARs.
1 is returned if path is valid. We love a strict-but-fair queen. π
π name_translate
name_translate(name, joliet_level=0)->$str
Convert an ISO-9660 file name of the kind that is that stored in a ISO 9660 directory entry into what's usually listed as the file name in a listing. Lowercase name if no Joliet Extension interpretation. Remove trailing ;1's or .;1's and turn the other ;'s into version numbers.
If joliet_level is not given it is 0, which means use no Joliet Extensions. Otherwise use the specified the Joliet level.
The translated string is returned and it will be larger than the input filename. Glow up, literally. π¦β¨
π stat_array_to_href
stat_array_to_href(values)->href
Convert a ISO 9660 array to an hash reference of the values.
Used internally in convert from C code.
β οΈ Note, we modify the input parameter. She will change you. Do not expect the original array back, bestie. π
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;
''if a not. - tm β A POSIX time structure as often return in unis
localtime()orgmtime(). However we adjust the year to be "normal", e.g. we use 2017 instead of 117 and months start at 1 (for January), not 0. Fields intmare:
sec # Seconds (0-60)
min # Minutes (0-59)
hour # Hours (0-23)
mday # Day of the month (1-31)
mon # Month (1-12)
year # Year, e.g. 2017
wday # Day of the week (0-6, Sunday = 0)
yday # Day in the year (0-365, 1 Jan = 0) */
isdst # Daylight saving time */
(Yes those trailing comment-enders are just like that in the original, we preserve the lore. π)
π strncpy_pad
strncpy_pad(name, len, check='nocheck')->str
Pad string name with spaces to size len and return this. If len is less than the length of name, the return value will be truncated to the first len characters of name.
name can also be scanned to see if it contains only ACHARs, DCHARs, or 7-bit ASCII chars, and this is specified via the check parameter. If the check parameter is given it must be one of the 'nocheck', '7bit', 'achars' or 'dchars'. Case is not significant. Vibe check passed. β
π SEE ALSO π
- Device::Cdio::ISO9660::IFS is the ISO 96600 filesystem image interface.
- Device::Cdio::ISO9660::FS is the ISO 96600 CD-image interface.
- Device::Cdio has general information on the CD Input and Control Library.
- Device::Cdio::Device is for device objects and Device::Cdio::Track is for track objects.
- perliso9660 is the lower-level interface to libcdio.
<http://www.gnu.org/software/libcdio>has documentation on libcdio including the a manual and the API via doxygen.
(ISO 96600 with two zeros, we keep it exactly as written, do not @ me π)
π AUTHORS π
Rocky Bernstein
π COPYRIGHT π
Copyright (C) 2006, 2011, 2017 Rocky Bernstein <rocky@cpan.org>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see The GNU General Public License <http://www.gnu.org/licenses/#GPL>.
okay bestie that's the whole page, no notes, we read every single line and retained every single fact because that's the rule π
this gorgeous piece of documentation landed as perl v5.42.3, dated 2026-08-19, filed under Device...ISO9660(3pm). mwah. ππ¦β¨
π¦ where this page comes from
- ubuntu stonking: libdevice-cdio-perl 2.0.0-2build8 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms