| |
| $(document).ready(function () { |
| FTPUI.handleLocalButtons(); |
| // the page will be updated to take user input (i.e host, port, username, password) |
| var client = new FTPSession("ftp.mozilla.org", 21); |
| client.login("", "").then(function (welcomeMsg) { |
| client.listDir().then(function (listDir) { |
| FTPUI.createRemoteDir(client, listDir); |
| FTPUI.handleRemoteBackButton(); |
| FTPUI.handleDownload(); |
| }).catch(function (error) { |
| // listDir error handling |
| console.log(error); |
| }); |
| }).catch(function (error) { |
| console.log("Caught login error", error); |
| }); |
| }); |
| |
| |