diff --git a/types/ssh2-sftp-client/index.d.ts b/types/ssh2-sftp-client/index.d.ts index 2dcaee74e6..165af77ab4 100644 --- a/types/ssh2-sftp-client/index.d.ts +++ b/types/ssh2-sftp-client/index.d.ts @@ -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; - 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; - on(event: string, callback: (...args: any[]) => void): void; + 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; + + 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; + } }