To get something working for the first version I used node-ftp
But this project is not maintained for last 4 years so I plan to rewrite it and fix bugs
I have to also research ftp-ts
This client is focused on ease of usage
With Promises and automatic connection management all you need to do is
const fsFtpTs = require("fs-ftp-ts");
(async () => {
const list = await fsFtpTs.readdir('ftp://speedtest.tele2.net/');
console.log(list.map(i => i.name));
const file = await fsFtpTs.readFile('ftp://demo:password@test.rebex.net/readme.txt');
console.log(file.toString('utf8'));
})();
I also try to keep API similar to Node.js File System API
$ yarn run test:all
$ yarn run test
End 2 End tests with real ftp server ftp-srv
This server does not provide me with weird errors
that I experience on the web with node-ftp
but I hope to emulate them.
$ yarn run test:e2e