Appending files |
You can append data to a remote file using any of the Sftp#upload methods that take a second boolean argument. Rather than replace the remote file, this will append the data that you are uploading to the remote file.
Example
// the source file File src = new File("c:/tmp/logs.txt");
// destination file on server String dest = "all-logs.txt";
// append source data to destination file sftp.upload(src,dest,true); |