sergi/jsftp

Command-list for beginner =(

Closed this issue · 3 comments

Hello,

i have found you Modul and i will test it for my project but im new on ssh/js ftp connetion i have read you info an check the command list and have become this:

raw: 
   { [Function]
     abor: [Function],
     pwd: [Function],
     cdup: [Function],
     feat: [Function],
     noop: [Function],
     quit: [Function],
     pasv: [Function],
     syst: [Function],
     cwd: [Function],
     dele: [Function],
     list: [Function],
     mdtm: [Function],
     mkd: [Function],
     mode: [Function],
     nlst: [Function],
     pass: [Function],
     retr: [Function],
     rmd: [Function],
     rnfr: [Function],
     rnto: [Function],
     site: [Function],
     stat: [Function],
     stor: [Function],
     type: [Function],
     user: [Function],
     xrmd: [Function],
     opts: [Function],
     chmod: [Function],
     size: [Function] },

The problem is, what is what? Get a refferenc for the list?
I need this ftp-plugin as file manger, then i update my editor with node-js using =)
My old script make this all over php, and i need function for:

  • rename file/folder
  • list all on folder (ok here i think can use list as command)
  • open a file read content and return/overwrite this

Can i make this with your JSftp modul?

Best regards, Stefan

Hi Stefan,

the list of FTP commands should help you out.
The commandsrnfr (rename from) & rnto (rename to) should work for your first use case.

I guess your third case (open, read, write) would involve a download (retr retrieve) and an upload (stor store) as the first and last step.

But I would suggest to use the comfort functions of jsftp instead of the raw commands:

HTH Robert

Hmm okay, thanks!!

Also for edit files i must all ways the file download, then i save temp to open it and modify then i save and upload the file.

More steps as by PHP.. I will look is that a good idea

sergi commented

Thanks for explaining, @robertgroh. And Stefan, jsftp is supposed to be used as a raw library for ftp. You can always build more flexible functions on top of it that automate some of the FTP steps.

Cheers!