code: protected void scanDir(File srcDir, File destDir, String[] files) {
      GlobPatternMapper m = new GlobPatternMapper();
      SourceFileScanner sfs = new SourceFileScanner(this);
      List<File> newFiles;
      if(!isForce()) {
        log.warn("Relying on ant's SourceFileScanner, which only looks at timestamps.  If broken references result, try setting option 'force' to true.");
      }
      for (String extension : getScriptExtensions()) {
        m.setFrom("*." + extension);
        m.setTo("*.class");
        log.debug("Scanning for *." + extension + " files...");
        if(isForce()) {
          newFiles = asFiles(srcDir, files, m);
        } else {
          newFiles = Arrays.asList(sfs.restrictAsFiles(files, srcDir, destDir, m));
        }
        log.debug("Found these files:");
        for(File newFile : newFiles) {
          log.debug('\t' + newFile.getAbsolutePath());
        }
        compileList.addAll(newFiles);
      }
  
    }
docs: Scans the directory looking for source files to be compiled.
  The results are returned in the class variable compileList
  
  @param srcDir  The source directory
  @param destDir The destination directory
  @param files   An array of filenames