IPWorks ZIP 2020 Node.js Edition

Questions / Feedback?

FileCompressedName Property

The file name of the current file, as stored inside of the archive.

Syntax

 sevenzip.getFileCompressedName(index, [callback])
 sevenzip.setFileCompressedName(index,  fileCompressedName, [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 getFileCompressedName([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 setFileCompressedName([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

The file name of the current file, as stored inside of the archive. This may be the same as in FileDecompressedName, but is not required to be.

All paths are stored in the archive in standard (UNIX) format. Pathnames specified in the host operating system's format will be immediately converted.

This field should generally be set with a relative path or with no path at all. The exact interpretation of the path is left to the decompression software; generally, pathnames will be interpreted as relative to a base directory, and these subdirectories will be created as needed. Absolute pathnames will not be interpreted correctly by the class, and may or may not be interpreted correctly by other decompression software.

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

Example


ZipControl.ArchiveFile = "c:\test.zip"
ZipControl.Files.Add(new ZIPFile())
ZipControl.Files[0].DecompressedName = "c:\test\ipworkszip\temp\test.txt"
ZipControl.Files[0].CompressedName = "readme.txt"
ZipControl.Compress()

The index parameter specifies the index of the item in the array. The size of the array is controlled by the FileCount property.

This property is not available at design time.

Data Type

String

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