perliso9660(3pm)

๐Ÿ’ฟ perliso9660(3pm) โ€” User Contributed Perl Documentation

โœจ NAME โœจ

okay so bestie, meet perliso9660: it's the lower-level wrapper to libiso9660, the ISO 9660 library of the CD Input and Control package. ๐Ÿ’–

๐ŸŒˆ SYNOPSIS ๐ŸŒˆ

This is a fairly straight-forward wrapper around the C library libiso9660. It's lowkey perfectly usable on its own, but the expectation is that the Object-Oriented interface Device::Cdio::ISO9660 is what most people will want to use. ๐Ÿซถ

There are various constants that are defined here. โœจ

๐Ÿ’– DESCRIPTION ๐Ÿ’–

Encapsulation is done in two parts. The lower-level Perl interface is called perliso9660 (this file) and is generated via SWIG. No cap. ๐Ÿ’…

๐Ÿ‘‘ CONSTANTS ๐Ÿ‘‘

  • ISO_BLOCKSIZE โ€” Number of bytes in an ISO 9660 block (2048). ๐Ÿงš
  • PVD_SECTOR โ€” "Primary Volume Descriptor" sector (16). ๐Ÿ‘‘
  • EVD_SECTOR โ€” "End Volume Descriptor" sector (17). ๐Ÿ’ซ
  • LEN_ISONAME โ€” Size in bytes of the filename portion + null byte (31). ๐ŸŒธ
  • MAX_SYSTEM_ID โ€” Maximum number of characters in a system id (32). ๐Ÿฆ‹
  • MAX_ISONAME โ€” Size in bytes of the filename portion + null byte. (37) ๐ŸŽ€
  • MAX_PREPARER_ID โ€” Maximum number of characters in a preparer id. (128) ๐Ÿ’–
  • MAX_ISOPATHNAME โ€” Maximum number of characters in the entire ISO 9660 filename. (255) ๐ŸŒˆ
  • MAX_PUBLISHER_ID โ€” Maximum number of characters in a publisher id. โญ
  • MAX_APPLICATION_ID โ€” Maximum number of characters in an application id. ๐Ÿ’œ
  • MAX_VOLUME_ID โ€” Maximum number of characters in a volume id. ๐Ÿ”ฅ
  • MAX_VOLUMESET_ID โ€” Maximum number of characters in a volume-set id. ๐ŸŒŸ
  • STANDARD_ID โ€” String inside frame which identifies an ISO 9660 filesystem. This string is the "id" field of an iso9660_pvd_t or an iso9660_svd_t. ๐Ÿซถ
  • EXTENSION_JOLIET_LEVEL1 โ€” Use Joliet Level 1. ๐Ÿ’ฟ
  • EXTENSION_JOLIET_LEVEL2 โ€” Use Joliet Level 2. ๐Ÿ’ฟ
  • EXTENSION_JOLIET_LEVEL3 โ€” Use Joliet Level 3 ๐Ÿ’ฟ
  • EXTENSION_ROCK_RIDGE โ€” Use Rock-Ridge Extensions. ๐Ÿชจ
  • EXTENSION_HIGH_SIERRA โ€” Use High-Sierra Extensions. ๐Ÿ”๏ธ
  • EXTENSION_ALL โ€” Use any of the above extensions. ๐ŸŒˆ
  • EXTENSION_NONE โ€” Use none of the above extensions. ๐Ÿšซ
  • EXTENSION_JOLIET โ€” Use any Joliet Extension available. โœจ

๐Ÿ“ Directory Flags

  • FILE โ€” Not really a flag but the lack of one. ๐Ÿ™ˆ
  • EXISTENCE โ€” Do not make existence known (hidden). ๐Ÿซฅ
  • DIRECTORY โ€” This file is a directory. ๐Ÿ“
  • ASSOCIATED โ€” This file is an associated file. ๐Ÿ”—
  • RECORD โ€” Record format is in extended attribute if not set. ๐Ÿ“
  • PROTECTION โ€” No read/execute permission in extended attribute. ๐Ÿ”’
  • DRESERVED1 โ€” Reserved bit 5. ๐Ÿช‘
  • DRESERVED2 โ€” Reserved bit 6. ๐Ÿช‘
  • MULTIEXTENT โ€” Not the final entry of a multi-extent file. ๐Ÿงฉ

๐Ÿ’ฟ Volume Descriptor Types

  • VD_BOOT_RECORD โ€” CD is bootable. ๐Ÿฅพ
  • VD_PRIMARY โ€” Primary Volume descriptor which must be in any ISO-9660. ๐Ÿ‘‘
  • VD_SUPPLEMENTARY โ€” (optional) Supplimentary Volume Descriptor. But used by Joliet, for example. โœจ
  • VD_PARITION โ€” Indicates a partition of a CD. ๐Ÿงฑ
  • VD_END ๐Ÿ›‘

๐Ÿงš Flags for strncpy

  • NOCHECK โ€” Enumeration meaning don not check in strncpy_pad. ๐Ÿ™…
  • SEVEN_BIT โ€” Enumeration in strncpy_pad for checking entry has only 7-bit characters. 7๏ธโƒฃ
  • ACHARS โ€” Enumeration in strncpy_pad for checking entry has only ACHARs. ๐Ÿ…ฐ๏ธ
  • DCHARS โ€” Enumeration in strncpy_pad for checking entry has only DCHARs. ๐Ÿ‡ฉ

๐Ÿ’– SUBROUTINES ๐Ÿ’–

๐Ÿ“‚ Input Output

open_iso

okay so bestie, this one opens an ISO 9660 image for reading. โœจ Maybe in the future we will have a mode, but for now that's the vibe. If something goes wrong, undef is returned. ๐Ÿ˜ญ

open_ext

Opens an ISO 9660 image for reading, but it lets various ISO 9660 extensions come through too. Maybe in the future we will have a mode. undef is returned on error. ๐Ÿ’…

open_fuzzy

Opens an ISO 9660 image for reading, with some tolerance for where exactly the ISO9660 image is sitting. We scan for $perliso9660::ISO_STANDARD_ID and use that to set the eventual offset to adjust by โ€” as long as that is <= i_fuzz. ๐Ÿ•ต๏ธ

Maybe in the future we will have a mode. undef is returned on error.

See also open_iso.

open_fuzzy_ext

Same energy as open_fuzzy โ€” opens an ISO 9660 image for reading with some tolerance for positioning, we scan for ISO_STANDARD_ID and use that to set the eventual offset to adjust by (as long as that is <= i_fuzz). ๐ŸŒธ

Maybe in the future we will have a mode. undef is returned on error.

ifs_fuzzy_read_superblock

Read the Super block of an ISO 9660 image, but also determine framesize and datastart and a possible additional offset. Generally here we are not reading an ISO 9660 image but a CD-Image which contains an ISO 9660 filesystem. ๐Ÿซถ

close

Close the previously opened ISO 9660 image. 1 is unconditionally returned โ€” iconique, no notes. If there was an error, 0 would be returned. โœจ

seek_read

Seek to a position and then read n bytes. (buffer, size) are returned. ๐Ÿ“–

fs_read_pvd

Read the Primary Volume Descriptor for a CD. 1 is returned if it read, and 0 if there was an error.

ifs_read_pvd

Read the Primary Volume Descriptor for an ISO 9660 image. 1 is returned if it read, and 0 if there was an error.

_fs_read_superblock

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. ๐Ÿ’ฟ

ifs_read_superblock

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. (yes bestie, same description as its sibling, they're twinning ๐Ÿ‘ฏ)

โฐ Time Conversion

set_dtime

Set time in format used in ISO 9660 directory index record from a Unix time structure. ๐Ÿ•ฐ๏ธ

set_ltime

Set "long" time in format used in ISO 9660 primary volume descriptor from a Unix time structure.

get_dtime

Get Unix time structure from format use in an ISO 9660 directory index record. Even though the tm_wday and tm_yday fields are not explicitly in dtime, they are calculated from the other fields. ๐Ÿงฎ

If tm is to reflect the localtime, set "use_localtime" 1, otherwise tm will reported in GMT.

get_ltime

Get "long" time in format used in ISO 9660 primary volume descriptor from a Unix time structure.

๐Ÿ”ค Character Classification and String Manipulation

is_dchar

Return 1 if c (an int) is a DCHAR โ€” a character that can appear in an ISO-9600 level 1 directory name. These are the ASCII capital letters A-Z, the digits 0-9 and an underscore. ๐Ÿ” 

is_achar

(she's listed with no description, bestie โ€” just a lil name hanging out ๐Ÿ’€)

name_translate

Convert an ISO-9660 file name that stored in a directory entry into what is usually listed as the file name in a listing. Lowercase the name, and remove trailing ;1's or .;1's, and turn the others into version numbers. ๐ŸŽ€

name_translate_ext

Convert an ISO-9660 file name that stored in a directory entry into what is 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 others into version numbers. ๐Ÿฆ‹

strncpy_pad

Pad string src with spaces to size len and copy this to dst. If len is less than the length of src, dst will be truncated to the first len characters of src. โœ‚๏ธ

src can also be scanned to see if it contains only ACHARs, DCHARs, 7-bit ASCII chars, depending on the enumeration _check.

In addition to getting changed, dst is the return value. Note: this string might not be undef terminated. ๐Ÿšจ

๐Ÿ—‚ File and Directory Names

dirname_valid_p

Check that psz_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.

1 is returned if psz_path is valid.

pathname_isofy

Take psz_path and a version number and turn that into a ISO-9660 pathname. (That is just the pathname followed by ";" and the version number. For example, mydir/file.ext -> MYDIR/FILE.EXT;1 for version 1. ๐Ÿ˜) The resulting ISO-9660 pathname is returned.

pathname_valid_p

Check that psz_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 psz_path is valid.

fs_find_lsn

Given a directory pointer, find the filesystem entry that contains lsn and return information about it. ๐Ÿ”Ž

Returns stat_t of entry if we found lsn, or undef otherwise.

ifs_find_lsn

Given a directory pointer, find the filesystem entry that contains lsn and return information about it. ๐Ÿ”Ž

Returns stat_t of entry if we found lsn, or undef otherwise.

fs_stat

Return file status for psz_path. undef is returned on error.

fs_stat_translate

Return file status for path name psz_path. undef is returned on error. pathname version numbers in the ISO 9660 name are dropped, i.e. ;1 is removed and if level 1 ISO-9660 names are lowercased. ๐Ÿ’…

ifs_stat

Return file status for pathname. undef is returned on error.

ifs_stat_translate

Return file status for path name psz_path. undef is returned on error. pathname version numbers in the ISO 9660 name are dropped, i.e. ;1 is removed and if level 1 ISO-9660 names are lowercased. ๐Ÿ’…

fs_readdir

Read psz_path (a directory) and return a list of iso9660_stat_t pointers for the files inside that directory. The caller must free the returned result. ๐Ÿงน

ifs_readdir

Read psz_path (a directory) and return a list of iso9660_stat_t pointers for the files inside that directory. The caller must free the returned result. ๐Ÿงน

get_dir_len

Return the directory name stored in the iso9660_dir_t.

A string is allocated: the caller must deallocate. ๐Ÿ™ˆ

dir_to_name

(no description on this one either โ€” she's mysterious ๐Ÿ’œ)

get_posix_filemode

Returns a POSIX mode for a given p_iso_dirent. ๐Ÿ”

๐Ÿ’ฟ Primary Volume Descriptor Routines

get_application_id

Return the PVD's application ID.

undef is returned if there is some problem in getting this.

ifs_get_application_id

Get the application ID. psz_app_id is set to undef if there is some problem in getting this and 0 is returned.

get_preparer_id

Return a string containing the preparer id with trailing blanks removed. โœ‚๏ธ

ifs_get_preparer_id

Get the preparer ID. psz_preparer_id is set to undef if there is some problem in getting this and 0 is returned.

get_publisher_id

Return a string containing the PVD's publisher id with trailing blanks removed. โœ‚๏ธ

ifs_get_publisher_id

Get the publisher ID. psz_publisher_id is set to undef if there is some problem in getting this and 0 is returned.

get_pvd_type

(no description, just vibes โœจ)

get_pvd_id

(no description โœจ)

get_pvd_space_size

(no description โœจ)

get_pvd_block_size

(no description โœจ)

get_pvd_version

Return the primary volume id version number (of pvd). If there is an error 0 is returned.

get_system_id

Return a string containing the PVD's system id with trailing blanks removed. โœ‚๏ธ

ifs_get_system_id

Get the system ID. psz_system_id is set to undef if there is some problem in getting this and 0 is returned.

get_root_lsn

Return the LSN of the root directory for pvd. If there is an error CDIO_INVALID_LSN is returned. ๐ŸŒณ

get_volume_id

Return the PVD's volume ID.

ifs_get_volume_id

okay bestie, the page literally says this:

"Get the system ID. psz_system_id is set to undef if there s some problem in getting this and 0 is returned."

that's a word-for-word copy of what's written under this entry (yes, it talks about the system ID and psz_system_id even though this is the volume ID one ๐Ÿ™ˆ) โ€” I'm not fixing it, I'm just telling you exactly what the docs say. fr fr.

get_volumeset_id

Return the PVD's volumeset ID. undef is returned if there is some problem in getting this.

ifs_get_volumeset_id

Get the systemset ID. psz_systemset_id is set to undef if there is some problem in getting this and 0 is returned.

๐Ÿงญ Path Table Routines

iso9660_pathtable_init

Zero out pathable. Do this first. ๐Ÿซก (that's genuinely what's written, typos and all, bestie)

pathtable_get_size

(no description given ๐Ÿ’œ)

pathtable_l_add_entry

(no description given ๐Ÿ’œ)

pathtable_m_add_entry

(no description given ๐Ÿ’œ)

set_evd

(no description given ๐Ÿ’œ)

โœจ Miscellaneous

get_joliet_level

Return the Joliet level recognized for p_iso. ๐ŸŒˆ

ifs_is_xa

Return 1 if ISO 9660 image has extended attributes (XA).


๐Ÿซถ METHODS

this

This seems to be an artifact of SWIG. ๐Ÿ’€ (literally that's the whole note, girlie)


๐Ÿ‘€ SEE ALSO

<http://www.gnu.org/software/libcdio> has documentation on libcdio, including the manual and the API via doxygen. ๐Ÿ“š

๐Ÿ‘‘ AUTHORS

Rocky Bernstein "<rocky at cpan.org>".

Copyright (C) 2006, 2008, 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 <http://www.gnu.org/licenses/>.


and that's the whole page bestie, we ate and left no crumbs ๐Ÿ“๐Ÿ’… she's shipping as perl v5.42.3, dated 2026-08-19, and she's the perliso9660(3pm) section โ€” periodt. ๐Ÿ’–

๐Ÿ“ฆ where this page comes from