HDFSFileObject extends AbstractFileObject { @Override protected String[] doListChildren() throws Exception { HadoopFileStatus[] statusList = hdfs.listStatus( hdfs.getPath( getName().getPath() ) ); String[] children = new String[ statusList.length ]; for ( int i = 0; i < statusList.length; i++ ) { children[ i ] = statusList[ i ].getPath().getName(); } return children; } HDFSFileObject( final AbstractFileName name, final HDFSFileSystem fileSystem ); @Override void doCreateFolder(); @Override void doDelete();  }
@Test public void testDoListChildren() throws Exception { String childPathName = "fake-path-child"; testDoListChildrenInternal( childPathName ); }