Package org.apache.sshd.common.scp

Examples of org.apache.sshd.common.scp.ScpHelper.send()


        FileSystemFactory factory = clientSession.getFactoryManager().getFileSystemFactory();
        FileSystemView fs = factory.createFileSystemView(clientSession);
        ScpHelper helper = new ScpHelper(channel.getInvertedOut(), channel.getInvertedIn(), fs);

        helper.send(Arrays.asList(local),
                    options.contains(Option.Recursive),
                    options.contains(Option.PreserveAttributes));

        channel.close(false);
    }
View Full Code Here


        ScpHelper helper = new ScpHelper(in, out, root);
        try {
            if (optT) {
                helper.receive(root.getFile(path), optR, optD, optP);
            } else if (optF) {
                helper.send(Collections.singletonList(path), optR, optP);
            } else {
                throw new IOException("Unsupported mode");
            }
        } catch (IOException e) {
            try {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.