private void addFiles ( FileSet fs ) { // Get the files included in the fileset. DirectoryScanner ds = fs . getDirectoryScanner ( getProject ( ) ) ; // The base directory for all files. File basedir = ds . getBasedir ( ) ; // Loop over each file creating a File object. for ( String f : ds . getIncludedFiles ( ) ) { if ( SourceType . hasSourceFileExtension ( f ) ) { sourceFiles . add ( new File ( basedir , f ) ) ; } } }
Utility method that adds all of the files in a fileset to the list of files to be processed . Duplicate files appear only once in the final list . Files not ending with a valid source file extension are ignored .