node.js - Listing files from a remote directory with node -


i have remote directory on 'xyz.com/myimages/'. directory has many files in it.

i use node.js app retrieve list of file names url (xyz.com/myimages/). have verified apache configured permit directory indexing path.

how can retrieve file names form url using node.js?

if have ssh access can this:

var exec = require('child_process').exec;  exec("ssh login@xyz.com 'ls /path/to/myimages'",   function (error, stdout, stderr) {     console.log('remote files: ' + stdout);   }); 

Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -