Up

_7zExtract

Extract an 7zip archive (format 7z). If a file already exists, a backup (*.bak) will be done automatically.

If you want, you can define a callback for each extracted item. In this case, see _7zCallback. This optional callback must be defined before to use _7zExtract.

Prototype :

fun [P DW I I I] I

Return : I 0 if success.

See also

Example

Create a new directory and extract an archive in this. The callback is optional.

fun cb7z (blurb, user_parameter, archive, name, isdir, size, state)=
	_fooS sprintf "u : %s archive : %s name : %s size : %d isdir : %d state : %d\n" [user_parameter archive name size isdir state];
	0;;

fun main ()=
	_showconsole;
	...
	_createDirectory _getModifyDirectory "examples" "7z";
	_7zCallback @cb7z "CB";
	_fooId _7zExtract _checkpack "examples/packages.7z" _getModifyDirectory "examples/7z" 1 1 1;
	...