IPWorks ZIP 2020 Node.js Edition

Questions / Feedback?

ManifestFile Property

The name of the manifest file.

Syntax

 jar.getManifestFile([callback])
 jar.setManifestFile( manifestFile, [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 getManifestFile([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 setManifestFile([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

This property specifies the location of the manifest to be written to the jar archive.

The filename may be specified with or without a path. Paths may be relative or absolute, and should be specified in the format native to the host operating system. If the format is not native to the host operating system, the class will immediately attempt to convert it.

When Compress is invoked, the location of the manifest is determined according to ManifestFile and the FileCompressedName and FileDecompressedName fields of the Files collection. The collection will be updated immediately prior to compression, and additional entries will be added at the beginning if necessary. If ManifestFile is set to a nonempty string, its value will be written to the appropriate value of FileDecompressedName, overwriting any pre-existing value. If ManifestFile is set to an empty string, and any value of the FileCompressedName field in the Files collection has the value "META-INF/MANIFEST.MF", the corresponding value of FileDecompressedName will be used as the source of the manifest. If a source for the manifest is not specified, a default manifest will automatically be generated and added to the archive.

When Scan is called (either by the user or by Extract or ExtractAll), the location of the manifest will be determined, and the value of this property will be set to the corresponding value of the FileDecompressedName for that file. The value of ManifestFile may then be changed to write the manifest to a different location.

After calling Scan, "META-INF/MANIFEST.MF" may be passed as an argument to Extract to extract the manifest.

If during compression the file cannot be read, a trappable error will be generated.

Data Type

String

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