Navigation

Operators and Keywords

Function List:

C++ API

: files = unpack (file)
: files = unpack (file, dir)
: files = unpack (file, dir, filetype)

Unpack the archive file based on its extension to the directory dir.

If file is a list of strings, then each file is unpacked individually. Shell wildcards in the filename such as ‘*’ or ‘?’ are accepted and expanded.

If dir is not specified or is empty ([]), it defaults to the current directory. If a directory is in the file list, then filetype must also be specified.

The specific archive filetype is inferred from the extension of the file. The filetype may also be specified directly using a string which corresponds to a known extension.

Valid filetype extensions:

bz
bz2

bzip archive

gz

gzip archive

tar

tar archive

tarbz
tarbz2
tbz
tbz2

tar + bzip archive

targz
tgz

tar + gzip archive

z

compress archive

zip

zip archive

The optional return value is a list of files unpacked.

See also: bunzip2, gunzip, unzip, untar, bzip2, gzip, zip, tar.

Package: octave