forked from eflexsystems/node-samba-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
36 lines (31 loc) · 1.17 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
declare module 'samba-client' {
interface ISambaClientOptions {
readonly address: string;
readonly username?: string;
readonly password?: string;
readonly domain?: string;
readonly port?: number;
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[]>;
}
export = SambaClient;
}