Changes the local working directory.
99100101102103104105106107108109
// Change directory sftp.cd("j2ssh"); System.out.println(sftp.pwd()); // Change the mode sftp.chmod(0777, "j2ssh"); sftp.lcd("c:/"); // Upload a file sftp.put("system.gif"); // Change the local directory sftp.lcd("localdir"); // Download a file
103104105106107108109110111112113
sftp.chmod(0777, "j2ssh"); sftp.lcd("c:/"); // Upload a file sftp.put("system.gif"); // Change the local directory sftp.lcd("localdir"); // Download a file sftp.get("somefile.txt", "anotherfile.txt"); // Remove a directory or file sftp.rm("j2ssh"); // Quit