Skip to main content
Module

x/jszip/mod.ts>JSZip

A JSZip wrapper for handling zipfiles in deno
Latest
class JSZip
import { JSZip } from "https://deno.land/x/jszip@0.11.0/mod.ts";

Constructors

new
JSZip(z?: any)

Properties

protected
_z: any

Methods

addFile(
path: string,
content?: string | Uint8Array,
options?: JSZipFileOptions,
): JSZipObject

Add a file to the archive

file(path: string): JSZipObject

Get a file from the archive

files(): { [key: string]: JSZipObject; }
filter(predicate: (relativePath: string, file: JSZipObject) => boolean): JSZipObject[]

Get all files which match the given filter function

folder(name: string): JSZip

Returns an new JSZip instance with the given folder as root

generateAsync<T extends keyof OutputByType>(options?: JSZipGeneratorOptions<T>): Promise<OutputByType[T]>

Generates a new archive asynchronously

loadAsync(data: InputFileFormat, options?: JSZipLoadOptions): Promise<JSZip>

Load zip data

remove(path: string): JSZip

Removes the file or folder from the archive

unzip(dir?: string): Promise<void>

Unzip a JSZip asynchronously to a directory

writeZip(path: string): Promise<void>

Write zip file asynchronously to a file