List of usage examples for org.springframework.integration.sftp.session SftpSession list
@Override public LsEntry[] list(String path) throws IOException
From source file:com.st.si.Main.java
private static void rename(SftpSession session, String dir) throws IOException { for (ChannelSftp.LsEntry entry : session.list(dir)) { if (!entry.getFilename().contains(".xml")) continue; System.out.println(entry.getFilename()); String from = String.format("%s/%s", dir, entry.getFilename()); String to = String.format("%s.done", from); session.rename(from, to);// www. jav a 2 s . c o m } }