Skip to content

nsuite v2.2.1


nsuite / zipFile

Function: zipFile()

zipFile(options): Promise<number>

Defined in: UtilsFile.ts:65

Zips a single file and returns a promise that resolves when the zip operation is complete.

Parameters

options

ZipFileOptions

The options for the zip operation.

Returns

Promise<number>

  • A promise that resolves with final zip file size in Bytes when the zip operation is complete.

Example

ts
import { zipFile } from "nsuite";
await zipFile({
  pathInputFile: "./package.json",
  pathOutputFile: "./package.json.zip",
});

Released under the Apache-2.0 License.