setLastModified(localFile);
}
}
private void setLastModified(File localFile) throws JSchException {
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,
((long) fileAttributes
.getMTime())
* 1000);
}