Modules
Objects/Functions
SuiteScript 2.0
{Archiver}.archive({name: {string*},type: {string}})
N/compress Module
Archiver.archive()
Method Description:
Creates an archive with the added files and returns it as a temporary file object.
Returns:
file.File
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.archive(options)
Example:
// Code Example 1
// Add additional code
//...
var archiver = compress.createArchiver();
archiver.add({
file: binaryFile
});
archiver.add({
file: textFile,
directory: 'txt/'
});
var zipFile = archiver.archive({
name: 'myarchive.zip'
});
var tgzFile = archiver.archive({
name: 'myarchive.tar.gz'
});...
// Add additional code
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_158584789142.html