Tuesday, 11 April 2017

list all files in a remote server in nodejs

I'm using this script for listing all files in a server

var PromiseFtp = require('promise-ftp');

  var ftp = new PromiseFtp();
  ftp.connect({host: ipServer, user: user, password: password})
  .then(function (serverMessage) {
    return ftp.list('/directory/',false);
  }).then(function () {
    return ftp.end();
  });

How i can print all files of the directory?

thanks in advance.



via OiRc

No comments:

Post a Comment