-
Notifications
You must be signed in to change notification settings - Fork 43
/
index.d.ts
49 lines (45 loc) · 1.43 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
41
42
43
44
45
46
47
48
49
declare module "samba-client" {
interface ISambaClientOptions {
readonly address: string;
readonly username?: string;
readonly password?: string;
readonly domain?: string;
readonly port?: number;
readonly directory?: string;
readonly timeout?: number;
readonly maxProtocol?: string;
readonly maskCmd?: boolean;
}
interface ISambaItem {
readonly name: string;
readonly type: string;
readonly size: number;
readonly modifyTime: Date;
}
class SambaClient {
constructor(options: ISambaClientOptions);
getFile: (
path: string,
destination: string,
workingDir?: string
) => Promise<string | Buffer>;
sendFile: (path: string, destination: string) => Promise<string | Buffer>;
deleteFile: (fileName: string) => Promise<string | Buffer>;
listFiles: (
fileNamePrefix: string,
fileNameSuffix: string
) => Promise<string[]>;
mkdir: (remotePath: string, cwd?: string) => Promise<string | Buffer>;
dir: (remotePath: string, cwd?: string) => Promise<string | Buffer>;
fileExists: (remotePath: string, cwd?: string) => Promise<boolean>;
cwd: () => Promise<string>;
list: (remotePath: string) => Promise<ISambaItem[]>;
execute: (
smbCommand: string,
smbCommandArgs: string | string[],
workingDir?: string
) => Promise<string | Buffer>;
getAllShares: () => Promise<string[]>;
}
export = SambaClient;
}