decompress files from an archive
files = decompress(archivename, <opt_args>)
files = decompress(archivename, output, <opt_args>)
String vector of file names that have been extracted from the archive.
A string specifying the archive path and name that will be extracted.
A string containing the path where to extract the archive.
This represents a sequence of statements
key1=value1, key2=value2, ...
where key1
,
key2
, ... can be one of the following:
The password string needed to decrypt the archive.
![]() | This option is only available for ZIP files. |
decompress
extract files from the compressed archive.
It extracts the archive content in the current directory when output
is not given.
// extract a ZIP of fileio tests filesin = compress("TMPDIR/fileio_tests.zip", "SCI/modules/fileio/tests/unit_tests/*.tst") filesout = decompress("TMPDIR/fileio_tests.zip", "TMPDIR/fileio_tests") [p, fname, ext] = fileparts(filesout); assert_checkequal(filesin, fname+ext); // create then move in the output folder mkdir(TMPDIR+"/out"); cd("TMPDIR/out"); // extract the archive in pwd filesout = decompress("TMPDIR/fileio_tests.zip") assert_checkequal(filesin, filesout); | ![]() | ![]() |