List of usage examples for org.apache.commons.vfs2 FileObject delete
int delete(FileSelector selector) throws FileSystemException;
From source file:tw.edu.sinica.iis.SSHadoop.SSHSftp.java
public void sftpDelete(final String remoteDir) { try {/* www. j a v a 2s . c om*/ manager.init(); FileObject remote = manager.resolveFile(genConnectString() + remoteDir, opts.getOptions()); if (remote.exists()) { remote.delete(Selectors.SELECT_ALL); } } catch (FileSystemException e) { e.printStackTrace(); } finally { manager.close(); } }