-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
40 lines (38 loc) · 1.41 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* tslint:disable */
/* eslint-disable */
/* auto-generated by NAPI-RS */
export declare function openZipArchive(path: string): ZipArchive
export declare function openZipArchiveAsync(path: string, signal?: AbortSignal | undefined | null): Promise<ZipArchive>
export const enum CompressionMethod {
Stored = 0,
Deflated = 1,
Deflate64 = 2,
Bzip2 = 3,
Aes = 4,
Zstd = 5,
Lzma = 6,
Xz = 7
}
export interface WriteFileOptions {
compressionMethod?: CompressionMethod
compressionLevel?: number
permissions?: number
largeFile?: boolean
}
export declare function writeZip(srcDir: string, dst: string, options?: WriteFileOptions | undefined | null): void
export declare function writeZipAsync(srcDir: string, dst: string, options?: WriteFileOptions | undefined | null, signal?: AbortSignal | undefined | null): Promise<void>
export declare class ZipArchive {
static fromBuffer(buffer: Buffer): ZipArchive
isEmpty(): boolean
readFile(name: string): Buffer
readFileAsync(name: string, signal?: AbortSignal | undefined | null): Promise<Buffer>
extract(outdir: string): void
extractAsync(outdir: string, signal?: AbortSignal | undefined | null): Promise<void>
fileNames(): Array<string>
}
export declare class ZipWriter {
constructor()
writeFile(filepath: string, realpath?: string | undefined | null, options?: WriteFileOptions | undefined | null): void
finish(dst: string): void
finishToBuffer(): Buffer
}