decompress
decompress files from an archive
Syntax
files = decompress(archivename, <opt_args>)
files = decompress(archivename, output, <opt_args>)
Arguments
- files
String vector of file names that have been extracted from the archive.
- archivename
A string specifying the archive path and name that will be extracted.
- output (optional)
A string containing the path where to extract the archive.
- <opt_args>
This represents a sequence of statements
key1=value1, key2=value2, ...
wherekey1
,key2
, ... can be one of the following:- password
The password string needed to decrypt the archive.
This option is only available for ZIP files.
Description
decompress
extract files from the compressed archive.
It extracts the archive content in the current directory when output
is not given.
Examples
// 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);
See also
- compress — Compress files in an archive
Report an issue | ||
<< compress | Файлы: функции ввода/вывода | dispfiles >> |