bkisofs Usage and Reference Manual
<<< Previous | Function Reference | Next >>>

# Writing

## `bk_write_image()`

``int `bk_write_image``(const char* `newImagePathAndName`, VolInfo* `volInfo`, time_t `creationTime`, int `filenameTypes`, void(*`progressFunction`)(VolInfo*, double));`

Writes the ISO to `newImagePathAndName`.

If you don't care about the `creationTime` recorded on the new ISO (this is different from the creation time of the ISO file as recorded by the normal filesystem) just use `time(NULL)` for the parameter, so the current time will be stored as the creation time on the new ISO.

The `filenameTypes` parameter is different from the one used when reading the directory tree (it doesn't have to be the same). This one tells bk which filename types will be used on the new image. It is recommended that you use all of them: `FNTYPE_9660 | FNTYPE_ROCKRIDGE | FNTYPE_JOLIET`. Notice that to specify more than one type you | them together.

`progressFunction` is a pointer to a function that takes a `VolInfo*` and a `double` as parameters and returns `void`. bk will call this function every 1 second or so and the double will have a number between 0 and 100, which is a good approximation of how much has been written already. You can pass in NULL if you like but in that case control won't be returned to your code until `bk_write_image()` is finished doing what it has to do so you can't update a progress bar or cancel writing.

<<< Previous | Home | Next >>>
Deleting | Up | Cleanup