// Type definitions for ssh2-sftp-client 2.3 // Project: https://www.npmjs.com/package/ssh2-sftp-client // Definitions by: igrayson , Ascari Andrea , Kartik Malik // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import * as ssh2 from 'ssh2'; import * as ssh2Stream from 'ssh2-streams'; export = sftp; declare class sftp { connect(options: ssh2.ConnectConfig): Promise; list(remoteFilePath: string): Promise; get(remoteFilePath: string, useCompression?: boolean, encoding?: string | null): Promise; fastGet(remoteFilePath: string, localPath: string, options?: ssh2Stream.TransferOptions): Promise; put(input: string | Buffer | NodeJS.ReadableStream, remoteFilePath: string, useCompression?: boolean, encoding?: string): Promise; fastPut(localPath: string, emoteFilePath: string, options?: ssh2Stream.TransferOptions): Promise; mkdir(remoteFilePath: string, recursive?: boolean): Promise; rmdir(remoteFilePath: string, recursive?: boolean): Promise; delete(remoteFilePath: string): Promise; rename(remoteSourcePath: string, remoteDestPath: string): Promise; end(): Promise; } 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; } }