IPWorks ZIP 2020 Node.js Edition

Questions / Feedback?

Update Method

Will update certain files in an archive.

Syntax

zip.update(filenames, [callback])

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for this method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

When this method is called, the class will attempt to update files in the specified archive with the current files listed in the files collection. You may use the Filenames parameter to tell the class which files in the collection/archive must be updated.

Filenames may be set to one or more filenames or directory names. Files may be specified with or without a path, and with or without wildcards. If a path is specified, files in the indicated directory will be affected; subdirectories will be recursed into if RecurseSubdirectories is true. If no path is specified but wildcards are, matching files in all directories will be affected. If a single filename without a path is specified, it must correspond exactly to the appropriate value of FileCompressedName.

Directories should end with a slash ("/"). If a directory is specified, all files and subdirectories in the specified directory will be affected.

A pipe character ("|") should be used to separate multiple file or directory names. Alternatively, the method may be invoked repeatedly.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks ZIP 2020 Node.js Edition - Version 20.0 [Build 8300]