Package org.apache.tools.ant

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


                    Project.MSG_WARN);
            }
            ds = new FTPDirectoryScanner(ftp);
            fs.setupDirectoryScanner(ds, getProject());
            ds.setFollowSymlinks(fs.isFollowSymlinks());
            ds.scan();
        }

        String[] dsfiles = null;
        if (action == RM_DIR) {
            dsfiles = ds.getIncludedDirectories();
View Full Code Here


        }

        DirectoryScanner ds = new DirectoryScanner();
        setupDirectoryScanner(ds, p);
        ds.setFollowSymlinks(followSymlinks);
        ds.scan();
        return ds;
    }

    public void setupDirectoryScanner(FileScanner ds, Project p) {
        if (isReference()) {
View Full Code Here

    protected Hashtable scanSources(Hashtable map) {
        Hashtable files = new Hashtable();
        for (int i = 0; i < fileSets.size(); i++) {
            FileSet fs = (FileSet) fileSets.elementAt(i);
            DirectoryScanner ds = fs.getDirectoryScanner(getProject());
            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];
View Full Code Here

            final File f = new File(entries[i]);
            if (f.isDirectory()) {
                DirectoryScanner ds = new DirectoryScanner();
                ds.setBasedir(f);
                ds.setIncludes(new String[]{"**/*.java"});
                ds.scan();
                String[] included = ds.getIncludedFiles();
                for (int j = 0; j < included.length; j++) {
                    javaFiles.addElement(new File(f, included[j]));
                }
            } else if (entries[i].endsWith(".java")) {
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

        Iterator fileSetIter = fileSets.iterator();
        while( fileSetIter.hasNext() )
        {
            FileSet next = (FileSet)fileSetIter.next();
            DirectoryScanner dirScanner = next.getDirectoryScanner( getProject() );
            dirScanner.scan();
            String[] files = dirScanner.getIncludedFiles();
            for (String file : files)
            {
                File f = new File(dirScanner.getBasedir(), file);
                log( "processing: " + f.getAbsolutePath() );
View Full Code Here

                if (debug) {
                    log.debug("ds baseDir is [" + ds.getBasedir().getAbsolutePath() + "]");
                }

                ds.scan();
                String[] includedFiles = ds.getIncludedFiles();

                if (debug) {
                    log.debug("Got includedFiles [" + includedFiles + "]");
                }
View Full Code Here

        for (int i = 0; i < v.size(); i++) {
            FileSet fs = (FileSet) v.elementAt(i);
            DirectoryScanner ds = new DirectoryScanner();
            fs.setupDirectoryScanner(ds, getProject());
            ds.setFollowSymlinks(false);
            ds.scan();
            String[] incs = ds.getIncludedFiles();
            File dir = fs.getDir(getProject());

            // load included files as properties files:
            for (int j = 0; j < incs.length; j++) {
View Full Code Here

            ds = fs.getDirectoryScanner(task.getProject());
        } else {
            ds = new FTPDirectoryScanner(ftp);
            fs.setupDirectoryScanner(ds, task.getProject());
            ds.setFollowSymlinks(fs.isFollowSymlinks());
            ds.scan();
        }

        String[] dsfiles = null;
        if (task.getAction() == FTPTask.RM_DIR) {
            dsfiles = ds.getIncludedDirectories();
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.