mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
[@types/ssh2-sftp-client] "Formatting: Either use all tabs, or always use 4 spaces"
This commit is contained in:
Vendored
+39
-26
@@ -5,35 +5,48 @@
|
||||
|
||||
import * as ssh2 from 'ssh2';
|
||||
import * as ssh2Stream from 'ssh2-streams';
|
||||
|
||||
export = sftp;
|
||||
|
||||
declare class sftp {
|
||||
connect(options: ssh2.ConnectConfig): Promise<void>;
|
||||
list(remoteFilePath: string): Promise<sftp.FileInfo[]>;
|
||||
get(remoteFilePath: string, useCompression?: boolean, encoding?: string | null): Promise<NodeJS.ReadableStream>;
|
||||
fastGet(remoteFilePath: string, localPath: string, options?: ssh2Stream.TransferOptions): Promise<string>;
|
||||
put(input: string | Buffer | NodeJS.ReadableStream, remoteFilePath: string, useCompression?: boolean, encoding?: string): Promise<void>;
|
||||
fastPut(localPath: string, emoteFilePath: string, options?: ssh2Stream.TransferOptions): Promise<string>;
|
||||
mkdir(remoteFilePath: string, recursive?: boolean): Promise<void>;
|
||||
rmdir(remoteFilePath: string, recursive?: boolean): Promise<void>;
|
||||
delete(remoteFilePath: string): Promise<void>;
|
||||
rename(remoteSourcePath: string, remoteDestPath: string): Promise<void>;
|
||||
end(): Promise<void>;
|
||||
on(event: string, callback: (...args: any[]) => void): void;
|
||||
connect(options: ssh2.ConnectConfig): Promise<void>;
|
||||
|
||||
list(remoteFilePath: string): Promise<sftp.FileInfo[]>;
|
||||
|
||||
get(remoteFilePath: string, useCompression?: boolean, encoding?: string | null): Promise<NodeJS.ReadableStream>;
|
||||
|
||||
fastGet(remoteFilePath: string, localPath: string, options?: ssh2Stream.TransferOptions): Promise<string>;
|
||||
|
||||
put(input: string | Buffer | NodeJS.ReadableStream, remoteFilePath: string, useCompression?: boolean, encoding?: string): Promise<void>;
|
||||
|
||||
fastPut(localPath: string, emoteFilePath: string, options?: ssh2Stream.TransferOptions): Promise<string>;
|
||||
|
||||
mkdir(remoteFilePath: string, recursive?: boolean): Promise<void>;
|
||||
|
||||
rmdir(remoteFilePath: string, recursive?: boolean): Promise<void>;
|
||||
|
||||
delete(remoteFilePath: string): Promise<void>;
|
||||
|
||||
rename(remoteSourcePath: string, remoteDestPath: string): Promise<void>;
|
||||
|
||||
end(): Promise<void>;
|
||||
|
||||
on(event: string, callback: (...args: any[]) => void): void;
|
||||
}
|
||||
|
||||
declare namespace sftp {
|
||||
interface FileInfo {
|
||||
type: string;
|
||||
name: string;
|
||||
size: number;
|
||||
modifyTime: number;
|
||||
accessTime: number;
|
||||
rights: {
|
||||
user: string;
|
||||
group: string;
|
||||
other: string;
|
||||
};
|
||||
owner: number;
|
||||
group: number;
|
||||
}
|
||||
interface FileInfo {
|
||||
type: string;
|
||||
name: string;
|
||||
size: number;
|
||||
modifyTime: number;
|
||||
accessTime: number;
|
||||
rights: {
|
||||
user: string;
|
||||
group: string;
|
||||
other: string;
|
||||
};
|
||||
owner: number;
|
||||
group: number;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user