Qusly-Core is an FTP/FTPS/SFTP client, built around ssh2 and basic-ftp. It was built for Qusly - an elegant desktop client.
- Supports FTP, FTPS and SFTP
- Modern, promise based API
- Informative progress event, which includes eta and speed rate
- Client for concurrent file transfer
$ npm install qusly-core
Listing files:
import { Client } from 'qusly-core';
async function init() {
const client = new Client();
await client.connect({
host: 'www.example.com',
user: 'root',
password: 'password',
protocol: 'sftp',
});
const files = await client.readDir('/documents');
console.log(files);
await client.disconnect();
}
init();
Output:
[
{
name: 'logs.txt',
type: 'file',
ext: '.txt',
size: 43,
user: 'root',
group: 'root',
date: '2019-05-29T22:00:00.000Z',
permissions: {
user: 6,
group: 6,
},
},
];