public static List < String > getMatchingFileNames ( String root , String filterExpr , boolean fullPath ) { List < File > fileList = getMatchingFiles ( root , filterExpr ) ; List < String > list = new ArrayList < String > ( fileList . size ( ) ) ; for ( File f : fileList ) { if ( fullPath ) list . add ( f . getAbsolutePath ( ) ) ; else list . add ( f . getName ( ) ) ; } return list ; }
Get a list of file names from the given path that match the provided filter ; not recursive .