Package org.apache.tools.ant

Examples of org.apache.tools.ant.DirectoryScanner.scan()


      return(Collections.EMPTY_LIST);
    }
    DirectoryScanner ds = new DirectoryScanner();
    ds.setBasedir(path);
    ds.setIncludes(new String[]{"**/*"+filterString});
    ds.scan();
   
    List list = new ArrayList();
   
    List includedFiles = Arrays.asList(ds.getIncludedFiles());
    for (Iterator i = includedFiles.iterator() ; i.hasNext() ; ) {
View Full Code Here


    int expectedErrors = 0;
    int expectedFailures = 0;

    DirectoryScanner scanner = testResults.getDirectoryScanner(getProject());
    File baseDir = scanner.getBasedir();
    scanner.scan();
    for (String resultFileName : scanner.getIncludedFiles()) {
      File resultFile = new File(baseDir, resultFileName);
      if (resultFile.length() == 0) { continue; }
      log("processing file " + resultFileName, Project.MSG_VERBOSE);
      Document result;
View Full Code Here

    // See http://ant.apache.org/manual/develop.html#nested-elements
    public void addConfiguredFileSet(FileSet fs) {
      DirectoryScanner scanner = fs.getDirectoryScanner(getProject());
      File baseDir = scanner.getBasedir();
      scanner.scan();
      String[] includedFiles = scanner.getIncludedFiles();
      Arrays.sort(includedFiles);
      for (String localPath : includedFiles) {
        files.add(new File(baseDir, localPath));
      }
View Full Code Here

            String newBasedir = basedir + VM_EXT;

            DirectoryScanner ds = new DirectoryScanner();
            ds.setBasedir(basedir);
            ds.addDefaultExcludes();
            ds.scan();
            String[] files = ds.getIncludedFiles();
           
            for (int i = 0; i < files.length; i++)
            {
                writeTemplate(files[i], basedir, newBasedir);
View Full Code Here

            String newBasedir = basedir + ".new";
           
            DirectoryScanner ds = new DirectoryScanner();
            ds.setBasedir(basedir);
            ds.addDefaultExcludes();
            ds.scan();
            String[] files = ds.getIncludedFiles();
           
            for (int i = 0; i < files.length; i++)
            {
                writeSource(files[i], basedir, newBasedir);
View Full Code Here

  private File[] getFiles(FileSet[] pFileSets) {
    List list = new ArrayList();
    for (int i = 0;  i < pFileSets.length;  i++) {
      FileSet fileSet = pFileSets[i];
      DirectoryScanner scanner = fileSet.getDirectoryScanner(getProject());
      scanner.scan();
      String[] files = scanner.getIncludedFiles();
      for (int j = 0;  j < files.length;  j++) {
        list.add(new File(fileSet.getDir(getProject()), files[j]));
      }
    }
View Full Code Here

            Project.MSG_VERBOSE);
        result = false;
        continue;
      }
      DirectoryScanner scanner = myProduces[i].getDirectoryScanner(getProject());
      scanner.scan();
      String[] files = scanner.getIncludedFiles();
      if (files.length == 0) {
        log("The fileset specified by the nested 'produces' element #" + i + " is empty, up-to-date check returns false",
            Project.MSG_VERBOSE);
        result = false;
View Full Code Here

    protected Hashtable scanFileSets(){
        Hashtable files = new Hashtable();
        for (int i = 0; i < fileSets.size(); i++){
            FileSet fs = (FileSet) fileSets.elementAt(i);
            DirectoryScanner ds = fs.getDirectoryScanner(project);
            ds.scan();
            String[] f = ds.getIncludedFiles();
            log(i + ") Adding " + f.length + " files from directory " + ds.getBasedir(), Project.MSG_VERBOSE);
            for (int j = 0; j < f.length; j++){
                String pathname = f[j];
                if ( pathname.endsWith(".java") ){
View Full Code Here

            saxParserFactory.setValidating(true);
            SAXParser saxParser = saxParserFactory.newSAXParser();
   
                       
            DirectoryScanner ds = getDirectoryScanner(config.descriptorDir);
            ds.scan();
            String[] files = ds.getIncludedFiles();
   
            log(files.length + " deployment descriptors located.",
                Project.MSG_VERBOSE);
           
View Full Code Here

    Vector v = new Vector();
    final int size = filesets.size();
    for (int i = 0; i < size; i++) {
      FileSet fs = (FileSet) filesets.elementAt(i);
      DirectoryScanner ds = fs.getDirectoryScanner(getProject());
      ds.scan();
      String[] f = ds.getIncludedFiles();
      for (int j = 0; j < f.length; j++) {
        String pathname = f[j];
        File file = new File(ds.getBasedir(), pathname);
        file = project.resolveFile(file.getPath());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.