ssh2 sftp add exists (#45887)

This commit is contained in:
Tom Xu 2020-07-07 03:35:47 +08:00 committed by GitHub
parent f8f7cadd38
commit 32baaf33f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@
// Ron Buckton <https://github.com/rbuckton>
// Will Boyce <https://github.com/wrboyce>
// Lucas Motta <https://github.com/lucasmotta>
// Tom Xu <https://github.com/hengkx>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
@ -1454,6 +1455,14 @@ export interface SFTPWrapper extends events.EventEmitter {
*/
stat(path: string, callback: (err: any, stats: Stats) => void): boolean;
/**
* (Client-only)
* `path` exists.
*
* Returns `false` if you should wait for the `continue` event before sending any more traffic.
*/
exists(path: string, callback: (err: any) => void): boolean;
/**
* (Client-only)
* Retrieves attributes for `path`. If `path` is a symlink, the link itself is stat'ed