libcdio  2.1.0
Data Fields
iso9660_dir_s Struct Reference

Format of an ISO-9660 directory record. More...

#include <iso9660.h>

Data Fields

iso711_t length
 
iso711_t xa_length
 
iso733_t extent
 
iso733_t size
 
iso9660_dtime_t recording_time
 
uint8_t file_flags
 
iso711_t file_unit_size
 
iso711_t interleave_gap
 
iso723_t volume_sequence_number
 
union {
   iso711_t   len
 
   char   str [1]
 
filename
 

Detailed Description

Format of an ISO-9660 directory record.

Section 9.1 of ECMA 119.

This structure may have an odd length depending on how many characters there are in the filename! Some compilers (e.g. on Sun3/mc68020) pad the structures to an even length. For this reason, we cannot use sizeof (struct iso_path_table) or sizeof (struct iso_directory_record) to compute on disk sizes. Instead, we use offsetof(..., name) and add the name size. See mkisofs.h of the cdrtools package.

See also
iso9660_stat

Field Documentation

◆ extent

iso733_t iso9660_dir_s::extent

XA length if XA is used. Otherwise zero. (9.1.2)

◆ file_flags

uint8_t iso9660_dir_s::file_flags

Recording date and time (9.1.3)

◆ file_unit_size

iso711_t iso9660_dir_s::file_unit_size

If no XA then zero. If a directory, then bits 2,3 and 7 are zero. (9.1.6)

◆ filename

union { ... } iso9660_dir_s::filename

Ordinal number of the volume in the Volume Set on which the Extent described by this Directory Record is recorded. (9.1.9)

MSVC compilers cannot handle a zero sized array in the middle of a struct, and iso9660_dir_s is reused within iso9660_pvd_s. Therefore, instead of defining: iso711_t filename_len; char filename[]; we leverage the fact that iso711_t and char are the same size and use an union. The only gotcha is that the actual string payload of filename.str[] starts at 1, not 0.

◆ interleave_gap

iso711_t iso9660_dir_s::interleave_gap

File Unit size for the File Section if the File Section is recorded in interleaved mode. Otherwise zero. (9.1.7)

◆ len

iso711_t iso9660_dir_s::len

◆ length

iso711_t iso9660_dir_s::length

◆ recording_time

iso9660_dtime_t iso9660_dir_s::recording_time

data length of File Section. This does not include the length of any XA Records. (9.1.2)

◆ size

iso733_t iso9660_dir_s::size

LBA of first local block allocated to the extent

◆ str

char iso9660_dir_s::str[1]

◆ volume_sequence_number

iso723_t iso9660_dir_s::volume_sequence_number

Interleave Gap size for the File Section if the File Section is interleaved. Otherwise zero. (9.1.8)

◆ xa_length

iso711_t iso9660_dir_s::xa_length

Length of Directory record (9.1.1)


The documentation for this struct was generated from the following file: