ssh2-sftp-client
Advanced tools
Comparing version 4.0.3 to 4.0.4
{ | ||
"name": "ssh2-sftp-client", | ||
"version": "4.0.3", | ||
"version": "4.0.4", | ||
"description": "ssh2 sftp client for node", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
212
README.md
# Table of Contents | ||
1. [SSH2 SFTP Client](#org2d05174) | ||
2. [Installation](#orga6627a8) | ||
3. [Basic Usage](#org555685a) | ||
4. [Breaking Changes in Version 4.0.0](#orgb8a1628) | ||
5. [Documentation](#org9a9ccca) | ||
1. [Methods](#orgd6f69b2) | ||
1. [connect(config) ===> SFTPstream](#org8aed5bd) | ||
2. [list(path, pattern) ==> Array[object]](#orgc9acc5f) | ||
3. [exists(path) ==> boolean](#org20c37d4) | ||
4. [stat(path) ==> object](#org2bf719a) | ||
5. [get(path, dst, options) ==> String](#org63e06d9) | ||
6. [fastGet(remotePath, localPath, options) ===> string](#org148cac2) | ||
7. [put(src, remotePath, options) ==> string](#org9bd8e25) | ||
8. [fastPut(localPath, remotePath, options) ==> string](#orgade852f) | ||
9. [append(input, remotePath, options) ==> string](#orgf526c1b) | ||
10. [mkdir(path, recursive) ==> string](#orgc241509) | ||
11. [rmdir(path, recursive) ==> string](#orgcb7b23a) | ||
12. [delete(path) ==> string](#org5f2aaf5) | ||
13. [rename(fromPath, toPath) ==> string](#org8adc3aa) | ||
14. [chmod(path, mode) ==> string](#orgc9cf7df) | ||
15. [end() ==> boolean](#org6640bdd) | ||
16. [Add and Remove Listeners](#orge3bfd3b) | ||
6. [FAQ](#org1b29b3b) | ||
1. [How can you pass writable stream as dst for get method?](#org84b733e) | ||
2. [How can I upload files without having to specify a password?](#org3d27556) | ||
3. [How can I connect through a Socks Proxy](#org9213350) | ||
7. [Change Log](#org3793d61) | ||
1. [v4.0.3](#orgfff5fc8) | ||
2. [v4.0.2 (Current stable version)](#orgcedb95b) | ||
3. [v4.0.0](#orgf4e6546) | ||
4. [v2.5.2](#org33a63c3) | ||
5. [v2.5.1](#org78ad039) | ||
6. [v2.5.0](#org3f0ba46) | ||
7. [v2.4.3](#org355d5d5) | ||
8. [v2.4.2](#orgb7c9fab) | ||
9. [v2.4.1](#org0c0beaa) | ||
10. [v2.4.0](#orge80bc30) | ||
11. [v2.3.0](#orgadff725) | ||
12. [v3.0.0 – deprecate this version](#org7712d13) | ||
13. [v2.1.1](#orgf6ed439) | ||
14. [v2.0.1](#org8f0f6d0) | ||
15. [v1.1.0](#org0660d2b) | ||
16. [v1.0.5:](#org49073b6) | ||
8. [Logging Issues](#orgfea9882) | ||
9. [Pull Requests](#org1031470) | ||
10. [Contributors](#org81425ff) | ||
1. [SSH2 SFTP Client](#org9c08e76) | ||
2. [Installation](#org3f4f406) | ||
3. [Basic Usage](#org93a40da) | ||
4. [Breaking Changes in Version 4.0.0](#org18495a3) | ||
5. [Documentation](#org3222656) | ||
1. [Methods](#org96b12ba) | ||
1. [connect(config) ===> SFTPstream](#orgd70af09) | ||
2. [list(path, pattern) ==> Array[object]](#org6f3a281) | ||
3. [exists(path) ==> boolean](#orgf77e86f) | ||
4. [stat(path) ==> object](#org398bf4f) | ||
5. [get(path, dst, options) ==> String|Stream|Buffer](#org0587f21) | ||
6. [fastGet(remotePath, localPath, options) ===> string](#orgeb63dff) | ||
7. [put(src, remotePath, options) ==> string](#org1fe2c81) | ||
8. [fastPut(localPath, remotePath, options) ==> string](#orgee6b633) | ||
9. [append(input, remotePath, options) ==> string](#orgccf6a54) | ||
10. [mkdir(path, recursive) ==> string](#org0cc89e2) | ||
11. [rmdir(path, recursive) ==> string](#orgca9b1cf) | ||
12. [delete(path) ==> string](#orgb50e5b0) | ||
13. [rename(fromPath, toPath) ==> string](#org3827ade) | ||
14. [chmod(path, mode) ==> string](#org4ac8f13) | ||
15. [end() ==> boolean](#org2c3d2eb) | ||
16. [Add and Remove Listeners](#org6d6ffe5) | ||
6. [FAQ](#org5e4228c) | ||
1. [How can you pass writable stream as dst for get method?](#org8e9aed7) | ||
2. [How can I upload files without having to specify a password?](#org46645bb) | ||
3. [How can I connect through a Socks Proxy](#org785250c) | ||
7. [Change Log](#org9b06f52) | ||
1. [v4.0.4](#org0fd9b56) | ||
2. [v4.0.3](#orgd5633bd) | ||
3. [v4.0.2](#org51ec745) | ||
4. [v4.0.0](#orge421d28) | ||
5. [v2.5.2](#org243214c) | ||
6. [v2.5.1](#org23c6382) | ||
7. [v2.5.0](#orga9175d5) | ||
8. [v2.4.3](#org29bd506) | ||
9. [v2.4.2](#org6d8fc47) | ||
10. [v2.4.1](#org0ea121a) | ||
11. [v2.4.0](#org5f98b56) | ||
12. [v2.3.0](#org5b5e078) | ||
13. [v3.0.0 – deprecate this version](#org03e1923) | ||
14. [v2.1.1](#org38facd8) | ||
15. [v2.0.1](#org56e3cfb) | ||
16. [v1.1.0](#org84a40a5) | ||
17. [v1.0.5:](#org73e9d70) | ||
8. [Logging Issues](#org1e66e09) | ||
9. [Pull Requests](#org08ee895) | ||
10. [Contributors](#org06d8d77) | ||
<a id="org2d05174"></a> | ||
<a id="org9c08e76"></a> | ||
@@ -69,3 +70,3 @@ # SSH2 SFTP Client | ||
<a id="orga6627a8"></a> | ||
<a id="org3f4f406"></a> | ||
@@ -77,3 +78,3 @@ # Installation | ||
<a id="org555685a"></a> | ||
<a id="org93a40da"></a> | ||
@@ -99,3 +100,3 @@ # Basic Usage | ||
<a id="orgb8a1628"></a> | ||
<a id="org18495a3"></a> | ||
@@ -128,3 +129,3 @@ # Breaking Changes in Version 4.0.0 | ||
<a id="org9a9ccca"></a> | ||
<a id="org3222656"></a> | ||
@@ -140,3 +141,3 @@ # Documentation | ||
<a id="orgd6f69b2"></a> | ||
<a id="org96b12ba"></a> | ||
@@ -146,3 +147,3 @@ ## Methods | ||
<a id="org8aed5bd"></a> | ||
<a id="orgd70af09"></a> | ||
@@ -217,3 +218,3 @@ ### connect(config) ===> SFTPstream | ||
<a id="orgc9acc5f"></a> | ||
<a id="org6f3a281"></a> | ||
@@ -291,3 +292,3 @@ ### list(path, pattern) ==> Array[object] | ||
<a id="org20c37d4"></a> | ||
<a id="orgf77e86f"></a> | ||
@@ -327,3 +328,3 @@ ### exists(path) ==> boolean | ||
<a id="org2bf719a"></a> | ||
<a id="org398bf4f"></a> | ||
@@ -375,13 +376,19 @@ ### stat(path) ==> object | ||
<a id="org63e06d9"></a> | ||
<a id="org0587f21"></a> | ||
### get(path, dst, options) ==> String | ||
### get(path, dst, options) ==> String|Stream|Buffer | ||
Retrieve a file from a remote SFTP server. The `dst` argument defines the | ||
destination and can be either a string, a buffer or a writeable stream. In | ||
general, if your going to pass in a string as the destination, you are probably | ||
better off using the `fastGet()` method. | ||
destination and can be either a string, a writeable stream or undefined. If it | ||
is a string, it is interpreted as the path to a location on the local file | ||
system (path should include the file name). If it is a writeable stream, the | ||
remote data is piped into that stream. If `dst` is undefined, the method will | ||
put the data into a buffer and return that buffer when the Promise is | ||
resolved. If `dst` is defined, it is returned when the Promise is resolved. | ||
In general, if your going to pass in a string as the destination, you are | ||
probably better off using the `fastGet()` method. | ||
- **path:** String. Path to the remote file to download | ||
- **dst:** String|Buffer|Writeable. Destination for the data. If a string, it | ||
- **dst:** String|Stream. Destination for the data. If a string, it | ||
should be a local file path. | ||
@@ -430,3 +437,3 @@ - **options:** Options for the `get()` command (see below). | ||
<a id="org148cac2"></a> | ||
<a id="orgeb63dff"></a> | ||
@@ -474,3 +481,3 @@ ### fastGet(remotePath, localPath, options) ===> string | ||
<a id="org9bd8e25"></a> | ||
<a id="org1fe2c81"></a> | ||
@@ -528,3 +535,3 @@ ### put(src, remotePath, options) ==> string | ||
<a id="orgade852f"></a> | ||
<a id="orgee6b633"></a> | ||
@@ -572,3 +579,3 @@ ### fastPut(localPath, remotePath, options) ==> string | ||
<a id="orgf526c1b"></a> | ||
<a id="orgccf6a54"></a> | ||
@@ -618,3 +625,3 @@ ### append(input, remotePath, options) ==> string | ||
<a id="orgc241509"></a> | ||
<a id="org0cc89e2"></a> | ||
@@ -648,3 +655,3 @@ ### mkdir(path, recursive) ==> string | ||
<a id="orgcb7b23a"></a> | ||
<a id="orgca9b1cf"></a> | ||
@@ -679,3 +686,3 @@ ### rmdir(path, recursive) ==> string | ||
<a id="org5f2aaf5"></a> | ||
<a id="orgb50e5b0"></a> | ||
@@ -705,3 +712,3 @@ ### delete(path) ==> string | ||
<a id="org8adc3aa"></a> | ||
<a id="org3827ade"></a> | ||
@@ -731,3 +738,3 @@ ### rename(fromPath, toPath) ==> string | ||
<a id="orgc9cf7df"></a> | ||
<a id="org4ac8f13"></a> | ||
@@ -760,3 +767,3 @@ ### chmod(path, mode) ==> string | ||
<a id="org6640bdd"></a> | ||
<a id="org2c3d2eb"></a> | ||
@@ -784,3 +791,3 @@ ### end() ==> boolean | ||
<a id="orge3bfd3b"></a> | ||
<a id="org6d6ffe5"></a> | ||
@@ -811,3 +818,3 @@ ### Add and Remove Listeners | ||
<a id="org1b29b3b"></a> | ||
<a id="org5e4228c"></a> | ||
@@ -817,3 +824,3 @@ # FAQ | ||
<a id="org84b733e"></a> | ||
<a id="org8e9aed7"></a> | ||
@@ -882,3 +889,3 @@ ## How can you pass writable stream as dst for get method? | ||
<a id="org3d27556"></a> | ||
<a id="org46645bb"></a> | ||
@@ -918,3 +925,3 @@ ## How can I upload files without having to specify a password? | ||
<a id="org9213350"></a> | ||
<a id="org785250c"></a> | ||
@@ -954,3 +961,3 @@ ## How can I connect through a Socks Proxy | ||
<a id="org3793d61"></a> | ||
<a id="org9b06f52"></a> | ||
@@ -960,4 +967,12 @@ # Change Log | ||
<a id="orgfff5fc8"></a> | ||
<a id="org0fd9b56"></a> | ||
## v4.0.4 | ||
- Minor documentation fix | ||
- Fix return value from `get()` | ||
<a id="orgd5633bd"></a> | ||
## v4.0.3 | ||
@@ -969,5 +984,5 @@ | ||
<a id="orgcedb95b"></a> | ||
<a id="org51ec745"></a> | ||
## v4.0.2 (Current stable version) | ||
## v4.0.2 | ||
@@ -977,3 +992,3 @@ - Fix some minor packaging issues | ||
<a id="orgf4e6546"></a> | ||
<a id="orge421d28"></a> | ||
@@ -996,3 +1011,3 @@ ## v4.0.0 | ||
<a id="org33a63c3"></a> | ||
<a id="org243214c"></a> | ||
@@ -1005,3 +1020,3 @@ ## v2.5.2 | ||
<a id="org78ad039"></a> | ||
<a id="org23c6382"></a> | ||
@@ -1013,3 +1028,3 @@ ## v2.5.1 | ||
<a id="org3f0ba46"></a> | ||
<a id="orga9175d5"></a> | ||
@@ -1021,3 +1036,3 @@ ## v2.5.0 | ||
<a id="org355d5d5"></a> | ||
<a id="org29bd506"></a> | ||
@@ -1030,3 +1045,3 @@ ## v2.4.3 | ||
<a id="orgb7c9fab"></a> | ||
<a id="org6d8fc47"></a> | ||
@@ -1039,3 +1054,3 @@ ## v2.4.2 | ||
<a id="org0c0beaa"></a> | ||
<a id="org0ea121a"></a> | ||
@@ -1048,3 +1063,3 @@ ## v2.4.1 | ||
<a id="orge80bc30"></a> | ||
<a id="org5f98b56"></a> | ||
@@ -1062,3 +1077,3 @@ ## v2.4.0 | ||
<a id="orgadff725"></a> | ||
<a id="org5b5e078"></a> | ||
@@ -1072,3 +1087,3 @@ ## v2.3.0 | ||
<a id="org7712d13"></a> | ||
<a id="org03e1923"></a> | ||
@@ -1081,3 +1096,3 @@ ## v3.0.0 – deprecate this version | ||
<a id="orgf6ed439"></a> | ||
<a id="org38facd8"></a> | ||
@@ -1090,3 +1105,3 @@ ## v2.1.1 | ||
<a id="org8f0f6d0"></a> | ||
<a id="org56e3cfb"></a> | ||
@@ -1101,3 +1116,3 @@ ## v2.0.1 | ||
<a id="org0660d2b"></a> | ||
<a id="org84a40a5"></a> | ||
@@ -1109,3 +1124,3 @@ ## v1.1.0 | ||
<a id="org49073b6"></a> | ||
<a id="org73e9d70"></a> | ||
@@ -1118,3 +1133,3 @@ ## v1.0.5: | ||
<a id="orgfea9882"></a> | ||
<a id="org1e66e09"></a> | ||
@@ -1128,3 +1143,3 @@ # Logging Issues | ||
<a id="org1031470"></a> | ||
<a id="org08ee895"></a> | ||
@@ -1149,3 +1164,3 @@ # Pull Requests | ||
<a id="org81425ff"></a> | ||
<a id="org06d8d77"></a> | ||
@@ -1161,2 +1176,3 @@ # Contributors | ||
- **theophilusx:** Current maintainer | ||
- **henrytk:** Documentation fix | ||
@@ -294,3 +294,7 @@ /** | ||
removeListeners(rdr); | ||
resolve(wtr); | ||
if (typeof dst === 'string') { | ||
resolve(dst); | ||
} else { | ||
resolve(wtr); | ||
} | ||
}); | ||
@@ -297,0 +301,0 @@ rdr.pipe(wtr); |
Sorry, the diff of this file is not supported yet
98127
747
1133