0.1.0 • Published 5 years ago
fs-ftp-ts v0.1.0
WARNING: work in progress
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
FTP Client in TypeScript
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
Tests
$ yarn run test:all
Unit tests
$ 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