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

# Extracting

## `bk_extract()`

``int `bk_extract``(VolInfo* `volInfo`, const char* `srcPathAndName`, const char* `destDir`, bool `keepPermissions`, void(*`progressFunction`)(VolInfo*));`

This function will extract the file or directory `srcPathAndName` on the ISO to the directory `destDir` on the regular filesystem.

If the ISO has the RockRidge extension and you passed `FNTYPE_ROCKRIDGE` to `bk_read_dir_tree()`, and you pass true for `keepPermissions` then the files and directories extracted to the filesystem will have the same permissions as they did on the ISO.

Note that you cannot extract `/`

Also note that there is no way to make bk overwrite files on the filesystem.

`progressFunction` is a pointer to a function that takes a `VolInfo*` as a parameter and returns `void`. bk will call this function every 1 second or so. You can pass in NULL if you like but in that case control won't be returned to your code until `bk_extract()` is finished doing what it has to do so you can't update a progress bar or cancel extracting.

## `bk_extract_as()`

``int `bk_extract``(VolInfo* `volInfo`, const char* `srcPathAndName`, const char* `destDir`, const char* `nameToUse`, bool `keepPermissions`, void(*`progressFunction`)(VolInfo*));`

Same as `bk_extract()` but with the extra `nameToUse` parameter. If this is not null it will be used as the name of the destination file, rather than the name of the source on the ISO.

## `bk_extract_boot_record()`

``int `bk_extract_boot_record``(VolInfo* `volInfo`, const char* `destPathAndName`, unsigned `destFilePerms`);`

Extracts the boot record from the ISO to the file `destPathAndName`. The `destFilePerms` parameters is permission to be set for the resulting file.

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