statusList = fileSystem.globStatus( path );
else
statusList = fileSystem.globStatus( path, pathFilter );
if( statusList == null || statusList.length == 0 )
throw new TapException( "unable to find paths matching path pattern: " + pathPattern );
List<Hfs> notEmpty = new ArrayList<Hfs>();
for( int i = 0; i < statusList.length; i++ )
{
// remove empty files. some hadoop versions return non-zero for dirs
// so this jives with the expectations set in the above javadoc
if( statusList[ i ].isDir() || statusList[ i ].getLen() != 0 )
notEmpty.add( new Hfs( getScheme(), statusList[ i ].getPath().toString() ) );
}
if( notEmpty.isEmpty() )
throw new TapException( "all paths matching path pattern are zero length and not directories: " + pathPattern );
return notEmpty.toArray( new Hfs[ notEmpty.size() ] );
}