IPWorks ZIP 2020 Node.js Edition

Questions / Feedback?

FileDecompressedName Property

File name to decompress to, or compress from.

Syntax

 gzip.getFileDecompressedName([callback])
 gzip.setFileDecompressedName( fileDecompressedName, [callback])

Default Value

""

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 the getFileDecompressedName([callback]) method is defined as:

function(err, data){ }

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

'data' is the value returned by the method.

The callback for the setFileDecompressedName([callback]) 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

FileDecompressedName contains the name of the file in the archive, as stored on the file system, outside the archive.

When compressing a file, this property should be specified with a path, if necessary, to allow the file to be found by the class. If the file cannot be found when Compress is called, a trappable error will be generated, and the archive will not be correctly written.

When decompressing files, this property may be set after calling Scan and prior to calling Extract. If this property is set to the empty string when Extract is called, Extract will automatically set this property to an appropriate value.

Note: If Scan is not called before Extract, the component will internally call the method and any value in FileDecompressedName will be overwritten.

Paths on the local file system should be specified in the format native to the host operating system. They may also be specified in standard (UNIX) format, in which case they will be immediately converted.

Data Type

String

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