Here is some sample code that I've been using for testing from PS and ESTK:
- Code: Select all
//
//@show include
//
//@includepath "/c/Program Files/Adobe/xtools;/Developer/xtools"
//
//@include "xlib/FTP.jsx"
//@nclude "xlib/XBridgeTalk.jsx"
//
RemoteFtpConnection.test = function() {
var conf = new FTPConfig();
conf.passive = false;
conf.username = "xbytor";
conf.password = "password";
conf.hostname = "192.168.1.114";
conf.logFile = "~/ftp.log";
conf.logEnabled = true;
var ftp = RemoteFtpConnection.createFrom(conf);
ftp.putDirTree(new Folder("/c/cygwin/home/xbytor/images"),
"tmp/images");
$.writeln("Done.");
};
RemoteFtpConnection.test();
The only api I've implemented on the RemoteFtpConnection class is putDirTree which will upload an entire directory tree to the server in the designated folder. That was the particular problem I had to solve; I'm adding ftp upload to my web photo gallery extension package.
I'll add other APIs as I need them or as people request.
-X
