SecureBlackbox Lite 2020 Node.js Edition

Questions / Feedback?

Extract Method

Extracts a single file from the archive.

Syntax

archivereader.extract(path, localPath, preserveFullPath, [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

Use this method to extract a single file from the archive.

Pass the internal path to the entry in the archive via the Path parameter, and the path where to save the extracted entry via the LocalPath parameter. Set PreserveFullPath to true to enforce full-path extraction, in which case LocalPath would indicate the mount point at which the full Path needs to be rooted. If PreserveFullPath is false, the LocalPath provides the final location for the extracted file.

Use ExtractAll to extract all files at once.

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox Lite 2020 Node.js Edition - Version 20.0 [Build 8166]