vtlab-generic-functions 1.0.25 → 1.0.26
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/ftp/ftpClientClass.js +2 -1
- package/package.json +1 -1
package/ftp/ftpClientClass.js
CHANGED
|
@@ -202,7 +202,8 @@ class FTPClientV2 {
|
|
|
202
202
|
await this.connect(this._ftpCredentials);
|
|
203
203
|
}
|
|
204
204
|
const files = await this._ftpInstance.list(folderPath);
|
|
205
|
-
|
|
205
|
+
const filesOnly = files && files.length ? files.filter(item => item.type !== 'd') : null;
|
|
206
|
+
return filesOnly ? filesOnly.map((file) => file.name) : files.map((file) => file.name)
|
|
206
207
|
} catch (error) {
|
|
207
208
|
throw new Error(`Failed to list files in folder on FTP server: ${error.message}`);
|
|
208
209
|
}
|