CDI file format¶
The CDI file contains header and some number of records. Each record represents one file (or directory).
CDI header¶
| Field |
Format |
Length |
Description |
| Mark |
"CDI" |
3 |
Always equal to "CDI" for CDI files |
| Version |
byte |
1 |
0x02 (0x01 for CDI v1) |
| Bootable |
byte |
1 |
Boolean: 0x00 or 0x01 |
| Volume ID |
string |
32 |
The name of the media |
| Size |
long int |
8 |
The size of the media (size 4 for CDI v1) |
| Publisher |
string |
128 |
The name of the publisher |
| Preparer |
string |
128 |
The name of the preparer |
| Generator |
string |
128 |
The name of ISO generator |
| Created |
date |
4 |
Creation date |
| Modified |
date |
4 |
The date of last modification |
CDI file record¶
| Field |
Format |
Length |
Description |
| ID |
long int |
4 |
The ID of the record |
| Type |
byte |
1 |
0 for directory, 1 for archive, 2 for file and 3 for symbolic link |
| Name |
string |
255 |
File/directory name |
| Mode |
short |
2 |
Access permissions |
| Created |
date |
4 |
The time when file was created |
| UID |
short |
2 |
File/directory owner ID |
| GID |
short |
2 |
File/directory group ID |
| Size |
long int |
8 |
The size of the file (size 4 for CDI v1) |
| Info |
long int |
4 |
Offset of the record in additional database (CDL, CDA etc) |
| Parent |
long int |
4 |
ID of the parent directory/archive file |
| Child |
long int |
4 |
ID of the first child (for directories) |
| Next |
long int |
4 |
ID of the next file |