-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathindex.d.ts
28 lines (23 loc) · 1.14 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
export interface ListItem {
name: string; // name of file/dir (path
size: string; // size
compressed: string; // packed size
date: string; // modified date
time: string; // modified time
attr: string; // attributes
crc: string; // CRC
encrypted: string; // encrypted
method: string; // compression method
block: string; // block
}
export type CallbackFn = (err: Error | null, output?: string) => void;
export type ListCallbackFn = (err: Error | null, listItems?: ListItem[]) => void;
export function unpack(pathToPack: string, destPath?: string): Promise<string>;
export function unpack(pathToPack: string, cb: CallbackFn): void;
export function unpack(pathToPack: string, destPath: string, cb: CallbackFn): void;
export function pack(pathToSrc: string, pathToDest: string): Promise<string>;
export function pack(pathToSrc: string, pathToDest: string, cb: CallbackFn): void;
export function list(pathToSrc: string): Promise<ListItem[]>;
export function list(pathToSrc: string, cb: ListCallbackFn): void;
export function cmd(paramsArr: string[]): Promise<string>;
export function cmd(paramsArr: string[], cb: CallbackFn): void;