Data Structures

This section describes the data structures used by bkisofs to store information about the ISO, directories and files. You shouldn't need to understand anything about VolInfo because all its members are accessible using getters and setters. You do need to understand how to read BkDir, BkFile, and BkSymLink because even though bk creates them and fills them in you will have to read their members yourself.

BkFileBase

typedef struct BkFileBase
{
    char original9660name[15]; /* 8.3 + ";1" max */
    char name[NCHARS_FILE_ID_MAX_STORE]; /* '\0' terminated */
    unsigned posixFileMode; /* file type and permissions */
    
    struct BkFileBase* next;
    
} BkFileBase;

This is the base class for directories and any type of files, that is - a directory and any type of file can be cast to a BkFileBase using BK_BASE_PTR().

original9660name is probably not going to be useful for you, it's the filename as recorded on the original ISO in the ISO9660 directory tree. It is saved by bk so that when you edit an ISO, it tries to preserve the original ISO9660 names. This helps some bootable CDs to stay bootable. If you only read the ISO9660 directory tree, you can get those filenaes from name.

name is holds the filename, read from whatever directory tree you requested when you called bk_read_dir_tree().

posixFileMode holds the type of the file and the permissions. It can be passed directly to one of the IS_*() macros.