# ISO9660 Class Reference

The ISO9660 class provides specialized analysis capabilities for ISO 9660 CD-ROM/DVD filesystem images.

## Inheritance
* **Inherits from Archive class** - All Archive class functions are available with ISO9660 prefix (e.g., `Archive.isArchiveRecordPresent` → `ISO9660.isArchiveRecordPresent`)
* **Inherits from Binary class** - All Binary class functions are available with ISO9660 prefix (e.g., `Binary.compare` → `ISO9660.compare`)

## Overview

ISO 9660 is the standard filesystem format for CD-ROMs and DVD-ROMs. This class enables detection and analysis of ISO image files commonly used for:
- Operating system installation media
- Software distribution
- Backup and archival purposes
- Virtual CD/DVD images

## Table of Contents
- [File Format Detection](#file-format-detection)
- [Volume Descriptor Information](#volume-descriptor-information)
- [Archive Content Analysis](#archive-content-analysis)
- [Usage Examples](#usage-examples)

## File Format Detection

### isValid()
**`bool isValid()`** - Verify if the file is a valid ISO 9660 image.

**Returns:** `true` if file has valid ISO 9660 structure, `false` otherwise

Checks for the ISO 9660 primary volume descriptor signature at the standard location (sector 16).

### getFileFormatName()
**`QString getFileFormatName()`** - Get the format name.

**Returns:** String containing "ISO 9660" or more specific format variant

### getFileFormatVersion()
**`QString getFileFormatVersion()`** - Get the ISO 9660 version.

**Returns:** Version string of the ISO 9660 format

### getFileFormatOptions()
**`QString getFileFormatOptions()`** - Get format-specific options or extensions.

**Returns:** String describing extensions like Joliet, Rock Ridge, etc.

## Volume Descriptor Information

### getSystemIdentifier()
**`QString getSystemIdentifier()`** - Get the system identifier from the Primary Volume Descriptor.

**Returns:** String containing the system that created the ISO image (32 characters maximum)

The system identifier describes the operating system or software system that can act upon sectors 0-15 of the volume.

### getVolumeIdentifier()
**`QString getVolumeIdentifier()`** - Get the volume identifier (volume label).

**Returns:** String containing the volume name/label (32 characters maximum)

This is the user-visible name of the volume, often used as a disc label.

### getVolumeSetIdentifier()
**`QString getVolumeSetIdentifier()`** - Get the volume set identifier.

**Returns:** String identifying the volume set this volume belongs to (128 characters maximum)

Used when multiple volumes are part of a set.

### getPublisherIdentifier()
**`QString getPublisherIdentifier()`** - Get the publisher identifier.

**Returns:** String identifying the volume publisher (128 characters maximum)

Specifies the organization or company that published the volume.

### getDataPreparerIdentifier()
**`QString getDataPreparerIdentifier()`** - Get the data preparer identifier.

**Returns:** String identifying who prepared the data (128 characters maximum)

Identifies the person or organization that prepared the data for recording.

### getApplicationIdentifier()
**`QString getApplicationIdentifier()`** - Get the application identifier.

**Returns:** String identifying the application used to create the volume (128 characters maximum)

Specifies the software application that was used to prepare the data on the volume. Commonly used to detect disc burning tools.

### getCopyrightFileIdentifier()
**`QString getCopyrightFileIdentifier()`** - Get the copyright file identifier.

**Returns:** String identifying the copyright file (37 characters maximum)

References a file within the ISO that contains copyright information.

### getAbstractFileIdentifier()
**`QString getAbstractFileIdentifier()`** - Get the abstract file identifier.

**Returns:** String identifying the abstract file (37 characters maximum)

References a file within the ISO that contains an abstract or summary.

### getBibliographicFileIdentifier()
**`QString getBibliographicFileIdentifier()`** - Get the bibliographic file identifier.

**Returns:** String identifying the bibliographic file (37 characters maximum)

References a file within the ISO that contains bibliographic information.

### getCreationDateTime()
**`QString getCreationDateTime()`** - Get the volume creation date and time.

**Returns:** String containing creation timestamp (17 characters in ISO 9660 format: YYYYMMDDHHMMSSmmZZ)

Format: Year(4), Month(2), Day(2), Hour(2), Minute(2), Second(2), Centiseconds(2), GMT offset(1)

### getModificationDateTime()
**`QString getModificationDateTime()`** - Get the volume modification date and time.

**Returns:** String containing last modification timestamp (17 characters)

Same format as creation date/time. Indicates when the volume was last modified.

### getExpirationDateTime()
**`QString getExpirationDateTime()`** - Get the volume expiration date and time.

**Returns:** String containing expiration timestamp (17 characters)

Date after which the volume is considered obsolete. May be empty/zeros if no expiration.

### getEffectiveDateTime()
**`QString getEffectiveDateTime()`** - Get the volume effective date and time.

**Returns:** String containing effective timestamp (17 characters)

Date from which the volume may be used. May be empty/zeros if effective immediately.

## Archive Content Analysis

### isArchiveRecordPresent()
**`bool isArchiveRecordPresent(QString sArchiveRecord)`** - Check if a specific file exists in the ISO image.

**Parameters:**
* `sArchiveRecord` - The filename or path to search for within the ISO filesystem

**Returns:** `true` if the file exists in the ISO image, `false` otherwise

### isArchiveRecordPresentExp()
**`bool isArchiveRecordPresentExp(QString sArchiveRecord)`** - Check if files matching a pattern exist in the ISO image.

**Parameters:**
* `sArchiveRecord` - Pattern or expression to match against files in the ISO

**Returns:** `true` if matching files exist, `false` otherwise

## Usage Examples

```javascript
// Basic ISO 9660 detection
if (ISO9660.isValid()) {
    sName = ISO9660.getFileFormatName();
    sVersion = ISO9660.getFileFormatVersion();
    sOptions = ISO9660.getFileFormatOptions();
    bDetected = true;
}

// Detect disc burning application
if (ISO9660.isValid()) {
    var sAppId = ISO9660.getApplicationIdentifier();
    
    if (sAppId.indexOf("NERO BURNING ROM") !== -1) {
        sName = "Nero Burning ROM";
        // Extract version if present
        bDetected = true;
    } else if (sAppId.indexOf("IMGBURN") !== -1) {
        sName = "ImgBurn";
        bDetected = true;
    } else if (sAppId.indexOf("CDRECORD") !== -1) {
        sName = "cdrecord";
        bDetected = true;
    }
}

// Check volume information
if (ISO9660.isValid()) {
    var sVolumeLabel = ISO9660.getVolumeIdentifier();
    var sPublisher = ISO9660.getPublisherIdentifier();
    var sCreationDate = ISO9660.getCreationDateTime();
    
    sOptions = "Volume: " + sVolumeLabel;
    if (sPublisher) {
        sOptions += ", Publisher: " + sPublisher;
    }
    bDetected = true;
}

// Detect bootable OS installation media
if (ISO9660.isArchiveRecordPresent("BOOT/BOOTFIX.BIN") || 
    ISO9660.isArchiveRecordPresent("isolinux/isolinux.bin")) {
    sName = "Bootable ISO";
    sOptions = "Linux installation media";
}

// Windows installation media detection
if (ISO9660.isArchiveRecordPresent("sources/install.wim") ||
    ISO9660.isArchiveRecordPresent("sources/boot.wim")) {
    sName = "Windows installation media";
    var sPreparer = ISO9660.getDataPreparerIdentifier();
    if (sPreparer) {
        sOptions = "Prepared by: " + sPreparer;
    }
    bDetected = true;
}

// Software distribution detection
if (ISO9660.isArchiveRecordPresent("setup.exe") ||
    ISO9660.isArchiveRecordPresent("autorun.inf")) {
    sName = "Software distribution ISO";
}

// Check for specific applications
if (ISO9660.isArchiveRecordPresent("VMware/vmware.exe")) {
    sName = "VMware distribution media";
    bDetected = true;
}
```

## Common ISO 9660 Extensions

- **Joliet** - Microsoft extension for long filenames and Unicode support
- **Rock Ridge** - POSIX extension for Unix-style permissions and long filenames
- **El Torito** - Extension for bootable CD-ROMs
- **UDF Bridge** - Hybrid format combining ISO 9660 with Universal Disk Format

## Notes

* ISO 9660 images typically have `.iso` file extension
* Maximum filename length in standard ISO 9660 is 31 characters (Level 1) or 207 characters (Level 2)
* Extensions like Joliet and Rock Ridge remove many of these limitations
* The class can analyze both physical CD/DVD media and ISO image files
