diff --git a/types/ssh2/index.d.ts b/types/ssh2/index.d.ts index aeee744808..c3f62fa6c0 100644 --- a/types/ssh2/index.d.ts +++ b/types/ssh2/index.d.ts @@ -4,6 +4,7 @@ // Ron Buckton // Will Boyce // Lucas Motta +// Tom Xu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -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