Example usage for org.apache.commons.vfs2 FileNotFolderException FileNotFolderException

List of usage examples for org.apache.commons.vfs2 FileNotFolderException FileNotFolderException

Introduction

In this page you can find the example usage for org.apache.commons.vfs2 FileNotFolderException FileNotFolderException.

Prototype

public FileNotFolderException(final Object info0) 

Source Link

Usage

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;
}