Package com.jcraft.jsch

Examples of com.jcraft.jsch.ChannelSftp.lstat()


        SftpATTRS fileAttributes = null;
        String remotePath = null;
        ChannelSftp channel = openSftpChannel();
        channel.connect();
        try {
            fileAttributes = channel.lstat(remoteDir(remoteFile)
                                           + localFile.getName());
        } catch (SftpException e) {
            throw new JSchException("failed to stat remote file", e);
        }
        FileUtils.getFileUtils().setFileLastModified(localFile,
View Full Code Here


    private void setLastModified(File localFile) throws JSchException {
        SftpATTRS fileAttributes = null;
        ChannelSftp channel = openSftpChannel();
        channel.connect();
        try {
            fileAttributes = channel.lstat(remoteDir(remoteFile)
                                           + localFile.getName());
        } catch (SftpException e) {
            throw new JSchException("failed to stat remote file", e);
        }
        FileUtils.getFileUtils().setFileLastModified(localFile,
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.