List < File > addCollectionFiles ( File newBasedir ) { final DirectoryScanner ds = new DirectoryScanner ( ) ; ds . setBasedir ( newBasedir ) ; if ( this . includes != null && this . includes . length > 0 ) { ds . setIncludes ( this . includes ) ; } else { ds . setIncludes ( DEFAULT_INCLUDES ) ; } ds . setExcludes ( this . excludes ) ; ds . addDefaultExcludes ( ) ; ds . setCaseSensitive ( false ) ; ds . setFollowSymlinks ( false ) ; ds . scan ( ) ; List < File > foundFiles = new ArrayList <> ( ) ; for ( String filename : ds . getIncludedFiles ( ) ) { foundFiles . add ( new File ( newBasedir , filename ) ) ; } return foundFiles ; }
Add source files to the files list .