List of usage examples for org.apache.commons.vfs2 FileNotFolderException FileNotFolderException
public FileNotFolderException(final Object info0)
From source file:org.apache.accumulo.start.classloader.vfs.providers.HdfsFileObject.java
@Override protected String[] doListChildren() throws Exception { if (this.doGetType() != FileType.FOLDER) { throw new FileNotFolderException(this); }/*from w ww. jav a 2 s .com*/ final FileStatus[] files = this.hdfs.listStatus(this.path); final String[] children = new String[files.length]; int i = 0; for (final FileStatus status : files) { children[i++] = status.getPath().getName(); } return children; }