Package net.schmizz.sshj.xfer

Examples of net.schmizz.sshj.xfer.FileSystemFile


            targetPath = workingDir + File.separator + targetDir + File.separator + file.getName();
            createDir(workingDir + File.separator + targetDir);
        }

        if (file.canRead()) {
            ssh.newSCPFileTransfer().upload(new FileSystemFile(file), targetPath);
            LOG.debug("Uploaded file " + file.getAbsolutePath() + " to " + targetPath);
        } else {
            LOG.error("Cannot load file " + file.getAbsolutePath() + " for upload");
            throw new TavernaExecutorException("Cannot load file " + file.getAbsolutePath() + " for upload");
        }
View Full Code Here


     *             if the file could not be downloaded
     */
    private void downloadFile(String path, File localFile) throws IOException {
        String sourcePath = workingDir + File.separator + path;

        ssh.newSCPFileTransfer().download(sourcePath, new FileSystemFile(localFile));
        LOG.debug("Downloaded file " + path + " to " + localFile.getPath());
    }
View Full Code Here

TOP

Related Classes of net.schmizz.sshj.xfer.FileSystemFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.