ssh2-sftp-client 11.0.0 → 12.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,131 +1,143 @@
1
- - [Overview](#org653583b)
2
- - [Version 11.0.0 Changes](#orgce280ef)
3
- - [Background](#orga2f4da7)
4
- - [Installation](#orgab4f971)
5
- - [Basic Usage](#orged5a12e)
6
- - [Documentation](#org5e3267a)
7
- - [Specifying Paths](#orgc8bb488)
8
- - [Methods](#org0b676b5)
9
- - [new SftpClient(name, callbacks) ===> SFTP client object](#orge77dba5)
10
- - [connect(config) ===> SFTP object](#org596a3a4)
11
- - [list(path, filter) ==> Array[object]](#orgf088b6d)
12
- - [exists(path) ==> boolean](#org1f048a8)
13
- - [stat(path) ==> object](#org27201d5)
14
- - [get(path, dst, options) ==> String|Stream|Buffer](#org639d68b)
15
- - [fastGet(remotePath, localPath, options) ===> string](#org3f8db62)
16
- - [put(src, remotePath, options) ==> string](#orgc6243de)
17
- - [fastPut(localPath, remotePath, options) ==> string](#orgff7efe4)
18
- - [append(input, remotePath, options) ==> string](#orgee8aa7c)
19
- - [mkdir(path, recursive) ==> string](#orgb3108f5)
20
- - [rmdir(path, recursive) ==> string](#orge7349b5)
21
- - [delete(path, noErrorOK) ==> string](#org8bed2a0)
22
- - [rename(fromPath, toPath) ==> string](#orgcc2fce2)
23
- - [posixRename(fromPath, toPath) ==> string](#org9f7fb45)
24
- - [chmod(path, mode) ==> string](#org8fd8a11)
25
- - [realPath(path) ===> string](#orgc1989a6)
26
- - [cwd() ==> string](#orgb7b4cfb)
27
- - [uploadDir(srcDir, dstDir, options) ==> string](#org8a09e7c)
28
- - [downloadDir(srcDir, dstDir, options) ==> string](#orge6dce87)
29
- - [createReadStream(remotePath, options)) ==> stream object](#org7beaf75)
30
- - [createWriteStream(remotePath, options) ==> stream object](#orgccad95e)
31
- - [rcopy(srcPath, dstPath) ==> string](#org96954f3)
32
- - [end() ==> boolean](#orga34b68f)
33
- - [Add and Remove Listeners](#org58bd78f)
34
- - [Platform Quirks & Warnings](#org4d91e2f)
35
- - [Server Capabilities](#org8fa9b52)
36
- - [Issues with `fastPut()` and `fastGet()` Methods](#orge45232c)
37
- - [Promises, Events & Managing Exceptions](#org294ac94)
38
- - [Adding Custom Handlers](#orgd3d6a3b)
39
- - [Windows Based Servers](#org32d3804)
40
- - [Don't Re-use SftpClient Objects](#org951849f)
41
- - [FAQ](#orgd48de8d)
42
- - [Remote server drops connections with only an end event](#orged95aaa)
43
- - [How can I pass writeable stream as dst for get method?](#org62169e3)
44
- - [How can I upload files without having to specify a password?](#org2bb26ed)
45
- - [How can I connect through a Socks Proxy](#orgc5e26e6)
46
- - [Timeout while waiting for handshake or handshake errors](#org8337f16)
47
- - [How can I limit upload/download speed](#orga5eb823)
48
- - [Connection hangs or fails for larger files](#org2469055)
49
- - [Typescript definition file out of date](#orga1d843c)
50
- - [Examples](#org0ab8b41)
51
- - [Troubleshooting](#org74214b7)
52
- - [Common Errors](#org9b87e06)
53
- - [Not returning the promise in a `then()` block](#org0ef5618)
54
- - [Mixing Promise Chains and Async/Await](#org3ef4393)
55
- - [Try/catch and Error Handlers](#org0cfccc7)
56
- - [Server Differences](#org93b86a4)
57
- - [Avoid Concurrent Operations](#orge2e0c12)
58
- - [Debugging Support](#orgbdaf17f)
59
- - [Logging Issues](#org7853a7f)
60
- - [Pull Requests](#org2eca80f)
61
- - [Contributors](#org8a2fb26)
62
-
63
-
64
-
65
- <a id="org653583b"></a>
1
+ - [Overview](#org4015600)
2
+ - [Version 12.0.0 Changes](#org9ba2cfa)
3
+ - [Version 12.0.1 Changes](#org658a511)
4
+ - [Background](#org4d07682)
5
+ - [Installation](#orgb1c417b)
6
+ - [Basic Usage](#orgbddd3fd)
7
+ - [Documentation](#org8c374be)
8
+ - [Specifying Paths](#org95c6689)
9
+ - [Methods](#org8437ec6)
10
+ - [new SftpClient(name, callbacks) ===> SFTP client object](#org210a6e7)
11
+ - [connect(config) ===> SFTP object](#org9c48be5)
12
+ - [list(path, filter) ==> Array[object]](#org190df3b)
13
+ - [exists(path) ==> boolean](#org7d245b2)
14
+ - [stat(path) ==> object](#orga6a58bd)
15
+ - [get(path, dst, options) ==> String|Stream|Buffer](#orgc3ea293)
16
+ - [fastGet(remotePath, localPath, options) ===> string](#org6261e44)
17
+ - [put(src, remotePath, options) ==> string](#org6c23ce2)
18
+ - [fastPut(localPath, remotePath, options) ==> string](#orgfda72d4)
19
+ - [append(input, remotePath, options) ==> string](#org6c67ab9)
20
+ - [mkdir(path, recursive) ==> string](#org99a7d1c)
21
+ - [rmdir(path, recursive) ==> string](#org31ab7d2)
22
+ - [delete(path, noErrorOK) ==> string](#org3a4a52a)
23
+ - [rename(fromPath, toPath) ==> string](#org9fbf1b2)
24
+ - [posixRename(fromPath, toPath) ==> string](#org0be5342)
25
+ - [chmod(path, mode) ==> string](#org9227f61)
26
+ - [realPath(path) ===> string](#orgdbe4247)
27
+ - [cwd() ==> string](#orge856d52)
28
+ - [uploadDir(srcDir, dstDir, options) ==> string](#org9337523)
29
+ - [downloadDir(srcDir, dstDir, options) ==> string](#org30526ff)
30
+ - [createReadStream(remotePath, options)) ==> stream object](#org98dacc6)
31
+ - [createWriteStream(remotePath, options) ==> stream object](#orgf250341)
32
+ - [rcopy(srcPath, dstPath) ==> string](#org16daa1a)
33
+ - [end() ==> boolean](#orgb329f2e)
34
+ - [Add and Remove Listeners](#org80dffcb)
35
+ - [Platform Quirks & Warnings](#org6e83e30)
36
+ - [Server Capabilities](#org75bad4f)
37
+ - [Issues with `fastPut()` and `fastGet()` Methods](#org3fe5a31)
38
+ - [Promises, Events & Managing Exceptions](#org9fd1871)
39
+ - [Adding Custom Handlers](#org256ad96)
40
+ - [Windows Based Servers](#org1eef7b1)
41
+ - [Don't Re-use SftpClient Objects](#org37ac59e)
42
+ - [FAQ](#orgc01e9f3)
43
+ - [Remote server drops connections with only an end event](#orgcbb84bd)
44
+ - [How can I pass writeable stream as dst for get method?](#orgb7ba758)
45
+ - [How can I upload files without having to specify a password?](#orgf9d915c)
46
+ - [How can I connect through a Socks Proxy](#orgc977636)
47
+ - [Timeout while waiting for handshake or handshake errors](#org9caf1fc)
48
+ - [How can I limit upload/download speed](#orgc99cfed)
49
+ - [Connection hangs or fails for larger files](#orgff1cf60)
50
+ - [Typescript definition file out of date](#org312104a)
51
+ - [Examples](#org409c3ef)
52
+ - [Troubleshooting](#orge118375)
53
+ - [Common Errors](#org39ed676)
54
+ - [Not returning the promise in a `then()` block](#orge4fdace)
55
+ - [Mixing Promise Chains and Async/Await](#org613b5f0)
56
+ - [Try/catch and Error Handlers](#org3df8f9d)
57
+ - [Server Differences](#org295cfa3)
58
+ - [Avoid Concurrent Operations](#org5ee2ce1)
59
+ - [Debugging Support](#orgec0b62a)
60
+ - [Logging Issues](#org41f81c7)
61
+ - [Pull Requests](#orgd153e6d)
62
+ - [Contributors](#org267dc2a)
63
+
64
+
65
+
66
+ <a id="org4015600"></a>
66
67
 
67
68
  # Overview
68
69
 
69
- This packan provides the class SftpClient, an SFTP client for node.js. It is a promise based decorator class around the excdellent [SSH2](https://github.com/mscdex/ssh2) package, which provides a pure node Javascript event based ssh2 implementation.
70
+ This package provides the class SftpClient, an SFTP client for node.js. It is a promise based decorator class around the excellent [SSH2](https://github.com/mscdex/ssh2) package, which provides a pure node Javascript event based ssh2 implementation.
70
71
 
71
- Documentation on the methods and available options in the underlying modules can be found on the [SSH2](https://github.com/mscdex/ssh2) project pages. As the ssh2-sftp-client package just a wrapper around the `ssh2` module, you will find lots of useful information, tips and examples in the `ssh2` repository.
72
+ Documentation on the methods and available options in the underlying modules can be found on the [SSH2](https://github.com/mscdex/ssh2) project pages. As the ssh2-sftp-client package is just a wrapper around the `ssh2` module, you will find lots of useful information, tips and examples in the `ssh2` repository.
72
73
 
73
- Current stable release is \*v11.0.0.
74
+ Current stable release is \*v12.0.1.
74
75
 
75
- Code has been tested against Node versions 18.20.4, 20.16.0 and 22.5.1. Node versions prior to v18.x are not supported. Also note there is currently a deprecation warning when using node v22+. This is from the `ssh2` package and outside control of this package.
76
+ Code has been tested against Node versions 20.19.2, 22.16.0, 23.11.1 and 24.2.0. Node versions prior to v20.x are not supported.
76
77
 
77
78
  If you find this module useful and you would like to support the on-going maintenance and support of users, please consider making a small [donation](https://square.link/u/gB2kSdkY?src=embed).
78
79
 
79
80
 
80
- <a id="orgce280ef"></a>
81
+ <a id="org9ba2cfa"></a>
81
82
 
82
- ## Version 11.0.0 Changes
83
+ ## Version 12.0.0 Changes
83
84
 
84
- The main change in v11 concerns how the package manages events raised by the `ssh2` packagwe it depends on. Managing events within the context of asynchronous code as ocurs when using promises is challenging. To understand some of the more subtle issues involved, it is recommended you read the [Asynchronous vs. synchronous](https://nodejs.org/docs/latest/api/events.html#asynchronous-vs-synchronous) and [Error events](https://nodejs.org/docs/latest/api/events.html#error-events) sections of the Events chapter from the node documentation.
85
+ The big and breaking change in this version is the removal of the connection retry code. This module no longer supports automatic connection retries when establishing the initial connection. This functionality was removed for a number of reasons. The main reasons are that it significantly complicated the connection handling code and error handling in particular and it was seldom useful. In most cases, if the connection failed on the first attempt, it would also fail in all subsequent attempts and often resulted in just extending the time to failure as multiple retries were attempted.
85
86
 
86
- The previous versions of this package use a global event handler approach to manage events raised outside the execution of any promise. However, this approach is problematic as all the global listeners can really do is raise an error. Attempting to catch errors raised inside event handlers is extremely difficult to manage within client code because those errors are raised inside a separate asynchronous execution context. In version 11, this approach has been replaced by a mechanism whereby the client code can pass in application specific global handlers if desired. If no handlers are defined, default handlers will log the event and when necessary, invalidate any existing connection objects. See the [1.2](#orga2f4da7) section for details.
87
+ Another reason this functionality was removed is because if you really want it, it is straight forward to create your own wrapper around the connect call which uses one of the mnay promise retry packages available. It is much simpler to add a retry mechanism for a specific application than it is to implement a flexible solution which supports all possible combination of connection options, authentication methods, proxies etc.
87
88
 
88
89
 
89
- <a id="orga2f4da7"></a>
90
+ <a id="org658a511"></a>
91
+
92
+ ## Version 12.0.1 Changes
93
+
94
+ Bug Fixes
95
+
96
+ - Fix typo error in specification of generic error code in error handler. Typo was causing an undefined symbol error.
97
+ - Fix bug in stream error handling. Read and write streams had an error handler defined with 'once' rather than 'on'. This caused a bug when an API call caused more than one error. For example, a network connectivity error would cause a stream timeout error followed by a no response from remote host error when the error handler attempted to cleanup and destroy the remote stream. The second error whould not be handled and would bubble up to the parent node process, which would then exit with an unhandled exception error.
98
+ - Added calls to \_resetEventFlags() to finally clauses to ensure event flags are reset when temp listeners are removed. Without this change, global listeners would not fire when they should after their has been an earlier handled error in the last API call.
99
+
100
+
101
+ <a id="org4d07682"></a>
90
102
 
91
103
  ## Background
92
104
 
93
- In basic terms `ssh2-sftp-client` is a simple wrapper around the `ssh2` package which provides a promise base API for interacting with a remote SFTP server . The `ssh2` package provides an event based API for interacting with the `ssh` protcolo. The `ssh2-sftp-client` package uses the `sftp` subsystem of this protocol to implement the basic operations typically associated with an `sftp` client.
105
+ In basic terms `ssh2-sftp-client` is a simple wrapper around the `ssh2` package which provides a promise based API for interacting with a remote SFTP server . The `ssh2` package provides an event based API for interacting with the `ssh` protocol. The `ssh2-sftp-client` package uses the `sftp` subsystem of this protocol to implement the basic operations typically associated with an `sftp` client.
94
106
 
95
- Wrapping an event based API with a promised based API comes with a number of challenges. In particular, efficiently and reliably managing events within the context of asynchrounous code execution. This package uses the following strategies;
107
+ Wrapping an event based API with a promise based API comes with a number of challenges. In particular, efficiently and reliably managing events within the context of asynchronous code execution. This package uses the following strategies;
96
108
 
97
- - All direct interactions with the `ssh2` API are wrapped in promise objects. When the API call succeeds, the assoiated promise will be sucessfully resolved. When an error occurs, the promise is rejected.
109
+ - All direct interactions with the `ssh2` API are wrapped in promise objects. When the API call succeeds, the associated promise will be successfully resolved. When an error occurs, the promise is rejected.
98
110
 
99
111
  - An error can either be due to a low level network error, such as a lost connection to the remote server or due to an operational error, such as a file not existing or not having the appropriate permissions for access.
100
112
 
101
- - Each of the available `SftpClient` methods wrap the method call inside a promise. In crwating eacvh promise, the class adds temporary event listenrs for the error, end and close events and links those liseners to the method's promise via it's `reject()` method.
113
+ - Each of the available `SftpClient` methods wrap the method call inside a promise. In creating each promise, the class adds temporary event listeners for the error, end and close events and links those liseners to the method's promise via its `reject()` method.
102
114
 
103
- - If a promise is waiting to be fulfilled when either of the two types of errors occurs, the error will be communicated back to client code via a rejected promise.
115
+ - If a promise is waiting to be fulfilled when an error occurs, the error will be communicated back to the client code via the rejected promise.
104
116
 
105
- - When the `ssh2` emitter raises an event outside the context of any promise, that event will be handled by global event handlers. By default, these event handlers will log the event and will invalidate any existing socket connection objects, preventing any further API calls until a new connection is extablished.
117
+ - When the `ssh2` emitter raises an event outside the context of any promise, that event will be handled by global event handlers. By default, these event handlers will log the event and will invalidate any existing socket connection objects, preventing any further API calls until a new connection is established.
106
118
 
107
- - The `SftpClient` class constructor supports an optoinal second argument which is an objedct whi8ch can have any of three properties representing event callbaqck funct5ions which will be executed for each of the possible events error, end and close.
119
+ - The `SftpClient` class constructor supports an optoinal second argument which is an objedct which can have any of the three properties error, end and close. The values associated with these properties are callback functions that will be run if an error event with?he same name as the property is raised and has not been handled by one of the temporary event handlers. The error callback should have a single parameter, the error raised by the event. The other callbacks have no arguments.
108
120
 
109
- The need for both global listeners and temporary promise listeners is because network end, close or error events can occur at any time, including in-betwseen API calls. During an API call, a promise is active and can be used to communicate event information back to the calling code via normal promise communication means i.e. async/await with try/catch or promise chain's then/catch mechanism. However, outside API calls, no promise exists and there is no reliable mechanism to return error and other event information back to calling code. You cannot reliably use try/cdatch to catch errorsx thrown inside event listenrs as you lack control over when the listener code runs. Your try/catch block can easily complete before the error is raised as there is no equivalent *await* type functionality in this situation.
121
+ The need for both global listeners and temporary promise listeners is because network end, close or error events can occur at any time, including in-between API calls. During an API call, a promise is active and can be used to communicate event information back to the calling code via normal promise communication channels i.e. async/await with try/catch or promise chain's then/catch mechanism. However, outside API calls, no promise exists and there is no reliable mechanism to return error and other event information back to calling code. You cannot reliably use try/cdatch to catch errors thrown inside event listenrs as you lack control over when the listener code runs. Your try/catch block can easily complete before the error is raised as there is no equivalent *await* type functionality in this situation.
110
122
 
111
123
  As there is no simple default way to return error and other event information back to the calling code, `ssh2-sftp-client` doesn't try to. Instead, the default action is to just log the event information and invalidate any existing sftp connections. This strategy is often sufficient for many use cases. For those cases where it isn't, client code can pass in end, close and/or error listener functions when instantiating the `SftpClient` object. If provided, these listners will be executed whenever the default global listeners are executed, which is whenever the `ssh2` event emitter raises an end, close or error event which is not handled by one of the temporary promise linked event listeners.
112
124
 
113
- Version 11 of `ssh2-sftp-client` also changes the behaviour of the temporary promise linked *end* and *close* listeners. Prior to versioln 11, these listeners did not reject promises. They would only invalidate the underlying `ssh` connection object. Only the *error* listener would actually reject the associated promise. This was done because you cannot guarantee the order in which events are responded to.
125
+ Version 11 of `ssh2-sftp-client` also changes the behaviour of the temporary promise linked *end* and *close* listeners. Prior to version 11, these listeners did not reject promises. They would only invalidate the underlying `ssh` connection object. Only the *error* listener would actually reject the associated promise. This was done because you cannot guarantee the order in which events are responded to.
114
126
 
115
- In most cases, events will occur in the order *error*, *end* and then *close*. The error event would contain details about the cause of the error while the end and close events just communicvate that these events have been raised. The normal flow would be
127
+ In most cases, events will occur in the order *error*, *end* and then *close*. The error event would contain details about the cause of the error while the end and close events just communicate that these events have been raised. The normal flow would be
116
128
 
117
- - Error event occurs including error cause description. Listener catches event, creates an error object and calls the associated promises reject function to reject the promise. The calling process receives a rejected promise object.
129
+ - Error event occurs including error cause description. Listener catches event, creates an error object and calls the associated promise's reject function to reject the promise. The calling process receives a rejected promise object.
118
130
 
119
131
  - End event occurs. The end listener catches the event and marks the connection object as invalid as the socket connection has been ended. There is no need to call the reject method of the associated promise as it has already been called by the error listener and you can only call one promise resolution function.
120
132
 
121
- - Close event occurs. This event means the socket connection has been closed. The listener will ensure any connection information has been invalidated. Aga8in, ther is no need to call the reject method of the associated promise as it has already been called by the error listener.
133
+ - Close event occurs. This event means the socket connection has been closed. The listener will ensure any connection information has been invalidated. Again, there is no need to call the reject method of the associated promise as it has already been called by the error listener.
122
134
 
123
- In some cases, no ende event is raised and you only get an error event followed by a close event. In versions of `ssh2-sftp-client` prior to version 11, neither the end or the close listeners attempted to call the reject method of the associated promise. It was assumed that all sftp servers would raise an error event whenever a connection was unexpectedly ended or closed. Unfortunately, it turns out some sftp servers are not well behaved and will terminate the connection without providing any error information or raising an error event. When this occurred in versions prior to version 11, it could result in either an API call hanging because its associated promise never gets rejected or resolved or the call gets rejected with a timeout error aftrer a significant delay.
135
+ In some cases, no end event is raised and you only get an error event followed by a close event. In versions of `ssh2-sftp-client` prior to version 11, neither the end or the close listeners attempted to call the reject method of the associated promise. It was assumed that all sftp servers would raise an error event whenever a connection was unexpectedly ended or closed. Unfortunately, it turns out some sftp servers are not well behaved and will terminate the connection without providing any error information or raising an error event. When this occurred in versions prior to version 11, it could result in either an API call hanging because its associated promise never gets rejected or resolved or the call gets rejected with a timeout error aftrer a significant delay.
124
136
 
125
- In order to handle the possible hanging issue in version 11, the temporary promise linked end and close listeners have been updated to always call the promise's reject function if they fire. While this works, it can cause a minor issue. As wse cannot gurantee the order in which events are resonded to by listeners, it is possible that either the end or close listener may be executed before the error listener. When this occurs, the promise is rejected, but the only information wse have at that point is that the promise wsas reject due to either an end or close event. We don't yet have any details regarding what error has caused the unexpected end or close event. Furthermore, because only the first promise resolution function call has any effect, calling reject within the error listener (assuming an error event does eventually arrive) has no effect and does not communicate error information back to the caller. This means that in some circumstances, especially when working with some poorly behaved sftp servers, an sftp connection will be lost/closed with no indication as to reason. This can make diagnosis and bug tracking frustrating.
137
+ In order to handle the possible hanging issue in version 11, the temporary promise linked end and close listeners have been updated to always call the promise's reject function if they fire. While this works, it can cause a minor issue. As wse cannot gurantee the order in which events are responded to by listeners, it is possible that either the end or close listener may be executed before the error listener. When this occurs, the promise is rejected, but the only information wse have at that point is that the promise wsas reject due to either an end or close event. We don't yet have any details regarding what error has caused the unexpected end or close event. Furthermore, because only the first promise resolution function call has any effect, calling reject within the error listener (assuming an error event does eventually arrive) has no effect and does not communicate error information back to the caller. This means that in some circumstances, especially when working with some poorly behaved sftp servers, an sftp connection will be lost/closed with no indication as to reason. This can make diagnosis and bug tracking frustrating.
126
138
 
127
139
 
128
- <a id="orgab4f971"></a>
140
+ <a id="orgb1c417b"></a>
129
141
 
130
142
  # Installation
131
143
 
@@ -134,7 +146,7 @@ npm install ssh2-sftp-client
134
146
  ```
135
147
 
136
148
 
137
- <a id="orged5a12e"></a>
149
+ <a id="orgbddd3fd"></a>
138
150
 
139
151
  # Basic Usage
140
152
 
@@ -157,18 +169,18 @@ sftp.connect({
157
169
  ```
158
170
 
159
171
 
160
- <a id="org5e3267a"></a>
172
+ <a id="org8c374be"></a>
161
173
 
162
174
  # Documentation
163
175
 
164
- The connection options are the same as those offered by the underlying SSH2 module, with just a couple of additional properties added to tweak the `retry` parameters, add a `debug` function and set the `promiseLimit` property. For full details on the other properties, please see [SSH2 client methods](https://github.com/mscdex/ssh2#user-content-client-methods). In particular, see the `ssh2` documentation for details relating to setting various key exchange and encryption/signing algorithms used as part of the ssh2 protocol.
176
+ The connection options are the same as those offered by the underlying SSH2 module, with just a couple of additional properties added to add a `debug` function and set the `promiseLimit` property. For full details on the other properties, please see [SSH2 client methods](https://github.com/mscdex/ssh2#user-content-client-methods). In particular, see the `ssh2` documentation for details relating to setting various key exchange and encryption/signing algorithms used as part of the ssh2 protocol.
165
177
 
166
178
  All the methods will return a Promise, except for `on(), ~removeListener()`, `createReadStream` and `createWriteStream`, which are typically only used in special use cases.
167
179
 
168
180
  Note that I don't use Typescript and I don't maintain any typescript definition files. There are some typescript type definition files for this module, but they are maintained separately and have nothing to do with this project. Therefore, please do not log any issues arising from the use of these definition files with this project. Instead, refer your issues to the maintainers of those modules.
169
181
 
170
182
 
171
- <a id="orgc8bb488"></a>
183
+ <a id="org95c6689"></a>
172
184
 
173
185
  ## Specifying Paths
174
186
 
@@ -201,12 +213,12 @@ client.put('/home/fred/test.txt', '/remote/dir/test-copy.txt');
201
213
  This will copy the local file `test.txt` to the remote file `test-copy.txt` in the directory `/remote/dir`.
202
214
 
203
215
 
204
- <a id="org0b676b5"></a>
216
+ <a id="org8437ec6"></a>
205
217
 
206
218
  ## Methods
207
219
 
208
220
 
209
- <a id="orge77dba5"></a>
221
+ <a id="org210a6e7"></a>
210
222
 
211
223
  ### new SftpClient(name, callbacks) ===> SFTP client object
212
224
 
@@ -246,7 +258,7 @@ Constructor to create a new `ssh2-sftp-client` object. An optional `name` string
246
258
  ```
247
259
 
248
260
 
249
- <a id="org596a3a4"></a>
261
+ <a id="org9c48be5"></a>
250
262
 
251
263
  ### connect(config) ===> SFTP object
252
264
 
@@ -256,9 +268,7 @@ Connect to an sftp server. Full documentation for connection options is availabl
256
268
 
257
269
  This module is based on the excellent [SSH2](https://github.com/mscdex/ssh2#client) module. That module is a general SSH2 client and server library and provides much more functionality than just SFTP connectivity. Many of the connect options provided by that module are less relevant for SFTP connections. It is recommended you keep the config options to the minimum needed and stick to the options listed in the `commonOpts` below.
258
270
 
259
- The `retries`, `retry_factor` and `retry_minTimeout` options are not part of the SSH2 module. These are part of the configuration for the [retry](https://www.npmjs.com/package/retry) package and what is used to enable retrying of sftp connection attempts. See the documentation for that package for an explanation of these values.
260
-
261
- The `promiseLimit` is another option which is not part of the `ssh2` module and is specific to `ssh2-sftp-client`. It is a property used to limit the maximum number of concurrent promises possible when either downloading or uploading a directory tree using the `downloadDir()` or `uploadDir()` methods. The default setting for this property is 10. **NOTE**: bigger doe snot mean better. Many factors can affect what is the ideal setting for `promiseLimit`. If it is too large, any benefits are lost while node spends time switching contexts and/or withi the overheads associated with creating and cleaning up promises. Lots of factors can affect what the setting should be, including size of files, number of files, speed of network, version of node, capabilities of remote sftp server etc. A setting of 10 seems to be a reasonably good default and should be adequate for most use cases. However, if you feel it needs to be changed, I highly recommend that you benchmark different values to work out what is the best maximum size before you begin to see a performance drop off.
271
+ The `promiseLimit` is an option which is not part of the `ssh2` module and is specific to `ssh2-sftp-client`. It is a property used to limit the maximum number of concurrent promises possible when either downloading or uploading a directory tree using the `downloadDir()` or `uploadDir()` methods. The default setting for this property is 10. **NOTE**: bigger does not mean better. Many factors can affect what is the ideal setting for `promiseLimit`. If it is too large, any benefits are lost while node spends time switching contexts and/or with the overheads associated with creating and cleaning up promises. Lots of factors can affect what the setting should be, including size of files, number of files, speed of network, version of node, capabilities of remote sftp server etc. A setting of 10 seems to be a reasonably good default and should be adequate for most use cases. However, if you feel it needs to be changed, I highly recommend that you benchmark different values to work out what is the best maximum size before you begin to see a performance drop off.
262
272
 
263
273
  ```javascript
264
274
  // common options
@@ -277,9 +287,6 @@ Connect to an sftp server. Full documentation for connection options is availabl
277
287
  strictVendor: true, // boolean - Performs a strict server vendor check
278
288
  debug: myDebug,// function - Set this to a function that receives a single
279
289
  // string argument to get detailed (local) debug information.
280
- retries: 2, // integer. Number of times to retry connecting
281
- retry_factor: 2, // integer. Time factor used to calculate time between retries
282
- retry_minTimeout: 2000, // integer. Minimum timeout between attempts
283
290
  promiseLimit: 10, // max concurrent promises for downloadDir/uploadDir
284
291
  };
285
292
 
@@ -315,7 +322,7 @@ Connect to an sftp server. Full documentation for connection options is availabl
315
322
  ```
316
323
 
317
324
 
318
- <a id="orgf088b6d"></a>
325
+ <a id="org190df3b"></a>
319
326
 
320
327
  ### list(path, filter) ==> Array[object]
321
328
 
@@ -376,7 +383,7 @@ Retrieves a directory listing. This method returns a Promise, which once realise
376
383
  ```
377
384
 
378
385
 
379
- <a id="org1f048a8"></a>
386
+ <a id="org7d245b2"></a>
380
387
 
381
388
  ### exists(path) ==> boolean
382
389
 
@@ -412,7 +419,7 @@ Tests to see if remote file or directory exists. Returns type of remote object i
412
419
  ```
413
420
 
414
421
 
415
- <a id="org27201d5"></a>
422
+ <a id="orga6a58bd"></a>
416
423
 
417
424
  ### stat(path) ==> object
418
425
 
@@ -463,7 +470,7 @@ Returns the attributes associated with the object pointed to by `path`.
463
470
  ```
464
471
 
465
472
 
466
- <a id="org639d68b"></a>
473
+ <a id="orgc3ea293"></a>
467
474
 
468
475
  ### get(path, dst, options) ==> String|Stream|Buffer
469
476
 
@@ -519,7 +526,7 @@ In general, if you're going to pass in a string as the destination, you are bett
519
526
  - **Tip:** See examples file in the Git repository for more examples. You can pass any writeable stream in as the destination. For example, if you pass in `zlib.createGunzip()` writeable stream, you can both download and decompress a gzip file 'on the fly'.
520
527
 
521
528
 
522
- <a id="org3f8db62"></a>
529
+ <a id="org6261e44"></a>
523
530
 
524
531
  ### fastGet(remotePath, localPath, options) ===> string
525
532
 
@@ -564,7 +571,7 @@ Bottom line, when it works, it tends to work reliably. However, for many servers
564
571
  ```
565
572
 
566
573
 
567
- <a id="orgc6243de"></a>
574
+ <a id="org6c23ce2"></a>
568
575
 
569
576
  ### put(src, remotePath, options) ==> string
570
577
 
@@ -614,7 +621,7 @@ Upload data from local system to remote server. If the `src` argument is a strin
614
621
  - **Tip:** If the src argument is a path string, consider just using `fastPut()`.
615
622
 
616
623
 
617
- <a id="orgff7efe4"></a>
624
+ <a id="orgfda72d4"></a>
618
625
 
619
626
  ### fastPut(localPath, remotePath, options) ==> string
620
627
 
@@ -660,7 +667,7 @@ Bottom line, when it works, it tends to work well. However, when it doesn't work
660
667
  ```
661
668
 
662
669
 
663
- <a id="orgee8aa7c"></a>
670
+ <a id="org6c67ab9"></a>
664
671
 
665
672
  ### append(input, remotePath, options) ==> string
666
673
 
@@ -704,7 +711,7 @@ Append the `input` data to an existing remote file. There is no integrity checki
704
711
  ```
705
712
 
706
713
 
707
- <a id="orgb3108f5"></a>
714
+ <a id="org99a7d1c"></a>
708
715
 
709
716
  ### mkdir(path, recursive) ==> string
710
717
 
@@ -732,7 +739,7 @@ Create a new directory. If the recursive flag is set to true, the method will cr
732
739
  ```
733
740
 
734
741
 
735
- <a id="orge7349b5"></a>
742
+ <a id="org31ab7d2"></a>
736
743
 
737
744
  ### rmdir(path, recursive) ==> string
738
745
 
@@ -762,7 +769,7 @@ Remove a directory. If removing a directory and recursive flag is set to `true`,
762
769
  ```
763
770
 
764
771
 
765
- <a id="org8bed2a0"></a>
772
+ <a id="org3a4a52a"></a>
766
773
 
767
774
  ### delete(path, noErrorOK) ==> string
768
775
 
@@ -791,7 +798,7 @@ Delete a file on the remote server.
791
798
  ```
792
799
 
793
800
 
794
- <a id="orgcc2fce2"></a>
801
+ <a id="org9fbf1b2"></a>
795
802
 
796
803
  ### rename(fromPath, toPath) ==> string
797
804
 
@@ -820,7 +827,7 @@ Rename a file or directory from `fromPath` to `toPath`. You must have the necess
820
827
  ```
821
828
 
822
829
 
823
- <a id="org9f7fb45"></a>
830
+ <a id="org0be5342"></a>
824
831
 
825
832
  ### posixRename(fromPath, toPath) ==> string
826
833
 
@@ -847,7 +854,7 @@ client.connect(config)
847
854
  ```
848
855
 
849
856
 
850
- <a id="org8fd8a11"></a>
857
+ <a id="org9227f61"></a>
851
858
 
852
859
  ### chmod(path, mode) ==> string
853
860
 
@@ -876,7 +883,7 @@ Change the mode (read, write or execute permissions) of a remote file or directo
876
883
  ```
877
884
 
878
885
 
879
- <a id="orgc1989a6"></a>
886
+ <a id="orgdbe4247"></a>
880
887
 
881
888
  ### realPath(path) ===> string
882
889
 
@@ -887,14 +894,14 @@ Converts a relative path to an absolute path on the remote server. This method i
887
894
  - **path:** A file path, either relative or absolute. Can handle '.' and '..', but does not expand '~'.
888
895
 
889
896
 
890
- <a id="orgb7b4cfb"></a>
897
+ <a id="orge856d52"></a>
891
898
 
892
899
  ### cwd() ==> string
893
900
 
894
901
  Returns what the server believes is the current remote working directory.
895
902
 
896
903
 
897
- <a id="org8a09e7c"></a>
904
+ <a id="org9337523"></a>
898
905
 
899
906
  ### uploadDir(srcDir, dstDir, options) ==> string
900
907
 
@@ -963,7 +970,7 @@ The `useFastput` option is a boolean option. If `true`, the method will use the
963
970
  ```
964
971
 
965
972
 
966
- <a id="orge6dce87"></a>
973
+ <a id="org30526ff"></a>
967
974
 
968
975
  ### downloadDir(srcDir, dstDir, options) ==> string
969
976
 
@@ -1028,7 +1035,7 @@ If the `useFastget` property is set to `true`, the method will use `fastGet()` t
1028
1035
  ```
1029
1036
 
1030
1037
 
1031
- <a id="org7beaf75"></a>
1038
+ <a id="org98dacc6"></a>
1032
1039
 
1033
1040
  ### createReadStream(remotePath, options)) ==> stream object
1034
1041
 
@@ -1045,7 +1052,7 @@ Returns a read stream object which is attached to the remote file specified by t
1045
1052
  - **end:** Position to stop reading bytes (inclusive).
1046
1053
 
1047
1054
 
1048
- <a id="orgccad95e"></a>
1055
+ <a id="orgf250341"></a>
1049
1056
 
1050
1057
  ### createWriteStream(remotePath, options) ==> stream object
1051
1058
 
@@ -1060,7 +1067,7 @@ Returns a write stream object which is attached to the remote file specified in
1060
1067
  - **start:** Byte position to start writing from (inclusive). May require changing flag to 'r+'.
1061
1068
 
1062
1069
 
1063
- <a id="org96954f3"></a>
1070
+ <a id="org16daa1a"></a>
1064
1071
 
1065
1072
  ### rcopy(srcPath, dstPath) ==> string
1066
1073
 
@@ -1070,7 +1077,7 @@ Perform a remote file copy. The file identified by the `srcPath` argument will b
1070
1077
  - **dstPath:** Path to where the copy will be created specified as a string
1071
1078
 
1072
1079
 
1073
- <a id="orga34b68f"></a>
1080
+ <a id="orgb329f2e"></a>
1074
1081
 
1075
1082
  ### end() ==> boolean
1076
1083
 
@@ -1094,7 +1101,7 @@ Ends the current client session, releasing the client socket and associated reso
1094
1101
  ```
1095
1102
 
1096
1103
 
1097
- <a id="org58bd78f"></a>
1104
+ <a id="org80dffcb"></a>
1098
1105
 
1099
1106
  ### Add and Remove Listeners
1100
1107
 
@@ -1115,12 +1122,12 @@ Although normally not required, you can add and remove custom listeners on the s
1115
1122
  Removes the specified listener from the event specified in eventType. Note that the `end()` method automatically removes all listeners from the client object.
1116
1123
 
1117
1124
 
1118
- <a id="org4d91e2f"></a>
1125
+ <a id="org6e83e30"></a>
1119
1126
 
1120
1127
  # Platform Quirks & Warnings
1121
1128
 
1122
1129
 
1123
- <a id="org8fa9b52"></a>
1130
+ <a id="org75bad4f"></a>
1124
1131
 
1125
1132
  ## Server Capabilities
1126
1133
 
@@ -1129,7 +1136,7 @@ All SFTP servers and platforms are not equal. Some facilities provided by `ssh2-
1129
1136
  One way to determine whether an issue you are encountering is due to `ssh2-sftp-client` or due to the remote server or server platform is to use a simple CLI sftp program, such as openSSH's sftp command. If you observe the same behaviour using plain `sftp` on the command line, the issue is likely due to server or remote platform limitations. Note that you should not use a GUI sftp client, like `Filezilla` or `winSCP` as such GUI programs often attempt to hide these server and platform incompatibilities and will take additional steps to simulate missing functionality etc. You want to use a CLI program which does as little as possible.
1130
1137
 
1131
1138
 
1132
- <a id="orge45232c"></a>
1139
+ <a id="org3fe5a31"></a>
1133
1140
 
1134
1141
  ## Issues with `fastPut()` and `fastGet()` Methods
1135
1142
 
@@ -1138,7 +1145,7 @@ The `fastPut()` and `fastGet()` methods are known to be somewhat dependent on SF
1138
1145
  To see an example of the type of issues you can observe with `fastPut()` or `fastGet()`, have a look at [issue 407](https://github.com/theophilusx/ssh2-sftp-client/issues/407), which describes the experiences of one user. Bottom line, when it works, it tends to work well and be significantly faster than using just `get()` or `put()`. However, when developing code to run against different SFTP servers, especially where you are unable to test against each server, you are likely better off just using `get()` and `put()` or structuring your code so that users can select which method to use (this is what `ssh2-sftp-client` does - for example, see the `!downloadDir()` and `uploadDir()` methods.
1139
1146
 
1140
1147
 
1141
- <a id="org294ac94"></a>
1148
+ <a id="org9fd1871"></a>
1142
1149
 
1143
1150
  ## Promises, Events & Managing Exceptions
1144
1151
 
@@ -1157,14 +1164,14 @@ The other area where additional events are fired is during the end() call. To de
1157
1164
  In addition to the promise based event handlers, `ssh2-sftp-client` also implements global event handlers which will catch any `error`, `end` or `close` events. Essentially, these global handlers only reset the `sftp` property of the client object, effectively ensuring any subsequent calls are rejected and in the case of an error, send the error to the console.
1158
1165
 
1159
1166
 
1160
- <a id="orgd3d6a3b"></a>
1167
+ <a id="org256ad96"></a>
1161
1168
 
1162
1169
  ### Adding Custom Handlers
1163
1170
 
1164
1171
  While the above strategies appear to work for the majority of use cases, there are always going to be edge cases which require more flexible or powerful event handling. To support this, the `on()` and `removeListener()` methods are provided. Any event listener added using the `on()` method will be added at the beginning of the list of handlers for that event, ensuring it will be called before any global or promise local events. See the documentation for the `on()` method for details.
1165
1172
 
1166
1173
 
1167
- <a id="org32d3804"></a>
1174
+ <a id="org1eef7b1"></a>
1168
1175
 
1169
1176
  ## Windows Based Servers
1170
1177
 
@@ -1173,7 +1180,7 @@ It appears that when the sftp server is running on Windows, a *ECONNRESET* error
1173
1180
  The best way to avoid this issue is to not re-use client objects. Always generate a new sftp client object for each new connection.
1174
1181
 
1175
1182
 
1176
- <a id="org951849f"></a>
1183
+ <a id="org37ac59e"></a>
1177
1184
 
1178
1185
  ## Don't Re-use SftpClient Objects
1179
1186
 
@@ -1182,12 +1189,12 @@ Due to an issue with *ECONNRESET* error signals when connecting to Windows based
1182
1189
  To avoid this problem, don't re-use SftpClient objects. Generate a new SftpClient object for each connection. You can perform multiple actions with a single connection e.g. upload multiple files, download multiple files etc, but after you have called end(), you should not try to re-use the object with a further connect() call. Create a new object instead.
1183
1190
 
1184
1191
 
1185
- <a id="orgd48de8d"></a>
1192
+ <a id="orgc01e9f3"></a>
1186
1193
 
1187
1194
  # FAQ
1188
1195
 
1189
1196
 
1190
- <a id="orged95aaa"></a>
1197
+ <a id="orgcbb84bd"></a>
1191
1198
 
1192
1199
  ## Remote server drops connections with only an end event
1193
1200
 
@@ -1198,7 +1205,7 @@ Clients first make an unauthenticated connection to the SFTP server to begin neg
1198
1205
  One way to avoid this type of issue is to add a delay between connection attempts. It does not need to be a very long delay - just sufficient to permit the previous connection to be authenticated. In fact, the default setting for openSSH is `10:30:60`, so you really just need to have enough delay to ensure that the 1st connection has completed authentication before the 11th connection is attempted.
1199
1206
 
1200
1207
 
1201
- <a id="org62169e3"></a>
1208
+ <a id="orgb7ba758"></a>
1202
1209
 
1203
1210
  ## How can I pass writeable stream as dst for get method?
1204
1211
 
@@ -1257,7 +1264,7 @@ sftp
1257
1264
  ```
1258
1265
 
1259
1266
 
1260
- <a id="org2bb26ed"></a>
1267
+ <a id="orgf9d915c"></a>
1261
1268
 
1262
1269
  ## How can I upload files without having to specify a password?
1263
1270
 
@@ -1292,7 +1299,7 @@ sftp.connect({
1292
1299
  ```
1293
1300
 
1294
1301
 
1295
- <a id="orgc5e26e6"></a>
1302
+ <a id="orgc977636"></a>
1296
1303
 
1297
1304
  ## How can I connect through a Socks Proxy
1298
1305
 
@@ -1329,7 +1336,7 @@ client.connect({
1329
1336
  ```
1330
1337
 
1331
1338
 
1332
- <a id="org8337f16"></a>
1339
+ <a id="org9caf1fc"></a>
1333
1340
 
1334
1341
  ## Timeout while waiting for handshake or handshake errors
1335
1342
 
@@ -1338,7 +1345,7 @@ Some users have encountered the error 'Timeout while waiting for handshake' or '
1338
1345
  When encountering this type of problem, one worthwhile approach is to use openSSH's CLI sftp program with the `-v` switch to raise logging levels. This will show you what algorithms the CLI is using. You can then use this information to match the names with the accepted algorithm names documented in the `ssh2` README to set the properties in the `algorithms` object.
1339
1346
 
1340
1347
 
1341
- <a id="orga5eb823"></a>
1348
+ <a id="orgc99cfed"></a>
1342
1349
 
1343
1350
  ## How can I limit upload/download speed
1344
1351
 
@@ -1378,7 +1385,7 @@ try {
1378
1385
  ```
1379
1386
 
1380
1387
 
1381
- <a id="org2469055"></a>
1388
+ <a id="orgff1cf60"></a>
1382
1389
 
1383
1390
  ## Connection hangs or fails for larger files
1384
1391
 
@@ -1389,21 +1396,21 @@ A symptom of this issue is that you are able to upload small files, but uploadin
1389
1396
  For more explanation, see [issue #342](https://github.com/theophilusx/ssh2-sftp-client/issues/342).
1390
1397
 
1391
1398
 
1392
- <a id="orga1d843c"></a>
1399
+ <a id="org312104a"></a>
1393
1400
 
1394
1401
  ## Typescript definition file out of date
1395
1402
 
1396
1403
  This project does not use Typescript. However, typescript definition files are provided by other 3rd parties. Sometimes, these definition files have not stayed up-to-date with the current version of this module. If you encounter this issue, you need to report it to the party responsible for the definition file, not this project.
1397
1404
 
1398
1405
 
1399
- <a id="org0ab8b41"></a>
1406
+ <a id="org409c3ef"></a>
1400
1407
 
1401
1408
  # Examples
1402
1409
 
1403
1410
  I have started collecting example scripts in the example directory of the repository. These are mainly scripts I have put together in order to investigate issues or provide samples for users. They are not robust, lack adequate error handling and may contain errors. However, I think they are still useful for helping developers see how the module and API can be used.
1404
1411
 
1405
1412
 
1406
- <a id="org74214b7"></a>
1413
+ <a id="orge118375"></a>
1407
1414
 
1408
1415
  # Troubleshooting
1409
1416
 
@@ -1418,14 +1425,14 @@ Note also that in the repository there are two useful directories. The first is
1418
1425
  The second directory is the validation directory. I have some very simple scripts in this directory which perform basic tasks using only the `ssh2` modules (no `ssh2-sftp-client` module). These can be useful when trying to determine if the issue is with the underlying `ssh2` module or the `ssh2-sftp-client` wrapper module.
1419
1426
 
1420
1427
 
1421
- <a id="org9b87e06"></a>
1428
+ <a id="org39ed676"></a>
1422
1429
 
1423
1430
  ## Common Errors
1424
1431
 
1425
1432
  There are some common errors people tend to make when using Promises or Async/Await. These are by far the most common problem found in issues logged against this module. Please check for some of these before logging your issue.
1426
1433
 
1427
1434
 
1428
- <a id="org0ef5618"></a>
1435
+ <a id="orge4fdace"></a>
1429
1436
 
1430
1437
  ### Not returning the promise in a `then()` block
1431
1438
 
@@ -1462,7 +1469,7 @@ Note the `return` statements. These ensure that the Promise returned by the clie
1462
1469
  A common symptom of this type of error is for file uploads or download to fail to complete or for data in those files to be truncated. What is happening is that the connection is being ended before the transfer has completed.
1463
1470
 
1464
1471
 
1465
- <a id="org3ef4393"></a>
1472
+ <a id="org613b5f0"></a>
1466
1473
 
1467
1474
  ### Mixing Promise Chains and Async/Await
1468
1475
 
@@ -1522,7 +1529,7 @@ async function doSftp() {
1522
1529
  ```
1523
1530
 
1524
1531
 
1525
- <a id="org0cfccc7"></a>
1532
+ <a id="org3df8f9d"></a>
1526
1533
 
1527
1534
  ### Try/catch and Error Handlers
1528
1535
 
@@ -1533,14 +1540,14 @@ The basic problem is that the try/catch block will have completed execution befo
1533
1540
  Error events are essentially asynchronous code. You don't know when such events will fire. Therefore, you cannot use a try/catch block to catch such event errors. Even creating an error handler which then throws an exception won't help as the key problem is that your try/catch block has already executed. There are a number of alternative ways to deal with this situation. However, the key symptom is that you see occasional uncaught error exceptions that cause your script to exit abnormally despite having try/catch blocks in your script. What you need to do is look at your code and find where errors are raised asynchronously and use an event handler or some other mechanism to manage any errors raised.
1534
1541
 
1535
1542
 
1536
- <a id="org93b86a4"></a>
1543
+ <a id="org295cfa3"></a>
1537
1544
 
1538
1545
  ### Server Differences
1539
1546
 
1540
1547
  Not all SFTP servers are the same. Like most standards, the SFTP protocol has some level of interpretation and allows different levels of compliance. This means there can be differences in behaviour between different servers and code which works with one server will not work the same with another. For example, the value returned by *realpath* for non-existent objects can differ significantly. Some servers will throw an error for a particular operation while others will just return null, some servers support concurrent operations (such as used by fastGet/fastPut) while others will not and of course, the text of error messages can vary significantly. In particular, we have noticed significant differences across different platforms. It is therefore advisable to do comprehensive testing when the SFTP server is moved to a new platform. This includes moving from to a cloud based service even if the underlying platform remains the same. I have noticed that some cloud platforms can generate unexpected events, possibly related to additional functionality or features associated with the cloud implementation. For example, it appears SFTP servers running under Azure will generate an error event when the connection is closed even when the client has requested the connection be terminated. The same SFTP server running natively on Windows does not appear to exhibit such behaviour.
1541
1548
 
1542
1549
 
1543
- <a id="orge2e0c12"></a>
1550
+ <a id="org5ee2ce1"></a>
1544
1551
 
1545
1552
  ### Avoid Concurrent Operations
1546
1553
 
@@ -1549,7 +1556,7 @@ Technically, SFTP should be able to perform multiple operations concurrently. As
1549
1556
  If you are going to try and perform concurrent operations, you need to test extensively and ensure you are using data which is large enough that context switching does occur (i.e. the request is not completed in a single run). Some SFTP servers will handle concurrent operations better than others.
1550
1557
 
1551
1558
 
1552
- <a id="orgbdaf17f"></a>
1559
+ <a id="orgec0b62a"></a>
1553
1560
 
1554
1561
  ## Debugging Support
1555
1562
 
@@ -1582,7 +1589,7 @@ If you just want to see debug messages from `ssh2-sftp-client` and exclude debug
1582
1589
  ```
1583
1590
 
1584
1591
 
1585
- <a id="org7853a7f"></a>
1592
+ <a id="org41f81c7"></a>
1586
1593
 
1587
1594
  # Logging Issues
1588
1595
 
@@ -1599,7 +1606,7 @@ I am happy to try and help diagnose and fix any issues you encounter while using
1599
1606
  Perhaps the best assistance is a minimal reproducible example of the issue. Once the issue can be readily reproduced, it can usually be fixed very quickly.
1600
1607
 
1601
1608
 
1602
- <a id="org2eca80f"></a>
1609
+ <a id="orgd153e6d"></a>
1603
1610
 
1604
1611
  # Pull Requests
1605
1612
 
@@ -1616,7 +1623,7 @@ This module will adopt a standard semantic versioning policy. Please indicate in
1616
1623
  - **Bug Fix:** No change to functionality or features. Simple fix of an existing bug.
1617
1624
 
1618
1625
 
1619
- <a id="org8a2fb26"></a>
1626
+ <a id="org267dc2a"></a>
1620
1627
 
1621
1628
  # Contributors
1622
1629