Modules

filter

 

Objects/Functions

module (N/compress)

SuiteScript 2.0

Archiver.add(options)

{Archiver}.add({file: {file.File*},directory: {string}})

N/compress Module
Archiver.add()
Method Description: Adds a file to be archived. In the archive, the path to the target file is options.directory or options.file.nam. If the options.directory parameter is not specified, the target file is located in the root directory of the archive.
Returns: void
Supported Script Types: Server scripts For more information, see SuiteScript 2.0 Script Types.
Governance: None
Module: N/compress Module
Parent Object: compress.Archiver
Sibling Object Members: Archiver Object Members
Since: 2020.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=Archiver.add(options)

Example:

// Code Example 1
// Add additional code
//...
archiver.add({
file: myJpegFile,
directory: 'pics/'
});
archiver.add({
file: myTxtFile
});
//...
// Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_158584723528.html