mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 07:47:04 +00:00
Include missing type for the method readFile
This commit is contained in:
Vendored
+24
@@ -1,6 +1,7 @@
|
||||
// Type definitions for ssh2-streams v0.1.9
|
||||
// Project: https://github.com/mscdex/ssh2-streams
|
||||
// Definitions by: Ron Buckton <https://github.com/rbuckton>
|
||||
// Definitions by: Ron Buckton <https://github.com/lucasmotta>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
@@ -1044,6 +1045,24 @@ export class SFTPStream extends stream.Transform {
|
||||
*/
|
||||
fastPut(localPath: string, remotePath: string, callback: (err: any) => void): void;
|
||||
|
||||
/**
|
||||
* (Client-only)
|
||||
* Reads a file in memory and returns its contents
|
||||
*/
|
||||
readFile(remotePath: string, options: ReadFileOptions, callback: (err: any, handle: Buffer) => void): void;
|
||||
|
||||
/**
|
||||
* (Client-only)
|
||||
* Reads a file in memory and returns its contents
|
||||
*/
|
||||
readFile(remotePath: string, encoding: string, callback: (err: any, handle: Buffer) => void): void;
|
||||
|
||||
/**
|
||||
* (Client-only)
|
||||
* Reads a file in memory and returns its contents
|
||||
*/
|
||||
readFile(remotePath: string, callback: (err: any, handle: Buffer) => void): void;
|
||||
|
||||
/**
|
||||
* (Client-only)
|
||||
* Returns a new readable stream for `path`.
|
||||
@@ -1612,6 +1631,11 @@ export interface TransferOptions {
|
||||
step?: (total_transferred: number, chunk: number, total: number) => void;
|
||||
}
|
||||
|
||||
export interface ReadFileOptions {
|
||||
encoding?: string
|
||||
flag?: string
|
||||
}
|
||||
|
||||
export interface ReadStreamOptions {
|
||||
flags?: string;
|
||||
encoding?: string;
|
||||
|
||||
Vendored
+20
@@ -3,6 +3,7 @@
|
||||
// Definitions by: Qubo <https://github.com/tkQubo>
|
||||
// Ron Buckton <https://github.com/rbuckton>
|
||||
// Will Boyce <https://github.com/wrboyce>
|
||||
// Lucas Motta <https://github.com/lucasmotta>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
@@ -21,6 +22,7 @@ import {
|
||||
Attributes,
|
||||
Stats,
|
||||
TransferOptions,
|
||||
ReadFileOptions,
|
||||
ReadStreamOptions,
|
||||
WriteStreamOptions,
|
||||
FileEntry
|
||||
@@ -1273,6 +1275,24 @@ export interface SFTPWrapper extends events.EventEmitter {
|
||||
*/
|
||||
fastPut(localPath: string, remotePath: string, callback: (err: any) => void): void;
|
||||
|
||||
/**
|
||||
* (Client-only)
|
||||
* Reads a file in memory and returns its contents
|
||||
*/
|
||||
readFile(remotePath: string, options: ReadFileOptions, callback: (err: any, handle: Buffer) => void): void;
|
||||
|
||||
/**
|
||||
* (Client-only)
|
||||
* Reads a file in memory and returns its contents
|
||||
*/
|
||||
readFile(remotePath: string, encoding: string, callback: (err: any, handle: Buffer) => void): void;
|
||||
|
||||
/**
|
||||
* (Client-only)
|
||||
* Reads a file in memory and returns its contents
|
||||
*/
|
||||
readFile(remotePath: string, callback: (err: any, handle: Buffer) => void): void;
|
||||
|
||||
/**
|
||||
* (Client-only)
|
||||
* Returns a new readable stream for `path`.
|
||||
|
||||
Reference in New Issue
Block a user