change remove to rename as the function is rename in the ssh2-sftp-client library (the README is misleading) (#18867)

This commit is contained in:
Elizard
2017-08-11 10:14:00 -07:00
committed by Mohamed Hegazy
parent 3a5ef9918f
commit 49b458f4d5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ declare module "ssh2-sftp-client" {
put(stream:NodeJS.ReadableStream, remoteFilePath:string, useCompression?:boolean):Promise<void>;
mkdir(remoteFilePath:string, recursive?:boolean):Promise<void>;
delete(remoteFilePath:string):Promise<void>;
remove(remoteSourcePath:string, remoteDestPath:string):Promise<void>;
rename(remoteSourcePath:string, remoteDestPath:string):Promise<void>;
end():Promise<void>;
}
}
@@ -20,6 +20,6 @@ client.mkdir('/remote/path/dir', true).then(() => null);
client.delete('remote/path').then(() => null);
client.remove('/remote/from', '/remote/to').then(() => null);
client.rename('/remote/from', '/remote/to').then(() => null);
client.end().then(() => null);