Getters

bk_estimate_iso_size()

off_t bk_estimate_iso_size(VolInfo* volInfo, int filenameTypes);

Call this to get an estimate of how much space the resulting ISO would use if it were written now. It is only an estimate, though usually pretty accurate.

The filenameTypes parameter should be the same as the one you would pass to bk_write_image().

bk_get_creation_time()

time_t bk_get_creation_time(VolInfo* volInfo);

Returns the creation time of the ISO if one was opened for reading. If no ISO was opened the return is 0.

The return is in the same format as that given by the system's time() function: the time since the Epoch (00:00:00 UTC, 1st of January, 1970), measured in seconds.

bk_get_publisher()

const char* bk_get_publisher(VolInfo* volInfo);

Returns a pointer to a NULL-terminated string with the name of the publisher - either read from an ISO or perhaps set by you using bk_set_publisher().

Do not modify or free this string. Make a copy if you need more than read-only access.

The maximum length of the publisher string is 128+1 bytes.

bk_get_volume_name()

const char* bk_get_volume_name(VolInfo* volInfo);

Returns a pointer to a NULL-terminated string with the name of the volume - either read from an ISO or perhaps set by you using bk_set_vol_name().

Do not modify or free this string. Make a copy if you need more than read-only access.

The maximum length of the volume name string is 32+1 bytes.

bk_get_error_string()

const char* bk_get_error_string(int errorId);

Any bk function that fails returns a negative int. That number is an error code, and to get the meaning of it pass it to bk_get_dir_from_string(). It will return a string with an error message.

The error string won't have the details about what exactly bk tried to do that failed. For example one error is Failed to open file on the filesystem for writing. This does not tell you what file bk tried to open or why it failed. But still, it's better than giving -1012 to the user as an explanation for failure.

Do not modify or free this string. Make a copy if you need more than read-only access.

bk_get_dir_from_string()

int bk_get_dir_from_string(VolInfo* volInfo, const char* pathStr, BkDir** dirFoundPtr);

This one is useful if you want random access to directories - meaning you can get access to any directory on the ISO using a path string, instead of traversing the entire tree from the root.

The parameter pathStr is a full path on the ISO.