Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2024.0.0 - Русский


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, ... where key1, 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 >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Oct 24 14:37:07 CEST 2023