zipFiles()

Creates a zip file from given file list.

Synopsis

int zipFiles(const dyn_string &filesToZip, const string &zipArchiveFile);

Parameters

Parameter Description
filesToZip Complete absolute list of files to be zipped.
zipArchiveFile Complete absolute path to the zip file.

Return value

  • The function returns 0 if it was executed successfully.
  • In the event of errors, the function returns -1 if an empty or non-existent directory or archive file is specified.
  • The function returns -2 if the executable file 7-Zip (WIN) or zip (Linux) is not available.
  • The function returns -3 if the command execution fails.
  • The function returns a value greater than 0 if some files that should have been added were not added to the archive. The exact positive number indicates the number of files that were not added.

Description

Creates a zip file from given file list. An external executable file (Windows: 7z.exe, Linux: zip) is required for the function to work correctly.

Assignment

File functions

Availability

UI, CTRL