Package org.apache.tools.ant.types

Examples of org.apache.tools.ant.types.Path.list()


        Object o = p.getReference("ordered.build.files");
        assertNotNull(o);
        assertTrue(o instanceof Path);

        Path path = (Path)o;
        String[] files = path.list();
        assertNotNull(files);
        assertEquals(3, files.length); // B should be filtered out

        assertEquals(new File("test/buildlist/C/build.xml").getAbsolutePath(), new File(files[0]).getAbsolutePath());
        assertEquals(new File("test/buildlist/A/build.xml").getAbsolutePath(), new File(files[1]).getAbsolutePath());
View Full Code Here


        Object o = p.getReference("ordered.build.files");
        assertNotNull(o);
        assertTrue(o instanceof Path);

        Path path = (Path)o;
        String[] files = path.list();
        assertNotNull(files);
        assertEquals(4, files.length); // B should be filtered out

        assertEquals(new File("test/buildlist/C/build.xml").getAbsolutePath(), new File(files[0]).getAbsolutePath());
        assertEquals(new File("test/buildlist/A/build.xml").getAbsolutePath(), new File(files[1]).getAbsolutePath());
View Full Code Here

        Object o = p.getReference("ordered.build.files");
        assertNotNull(o);
        assertTrue(o instanceof Path);

        Path path = (Path)o;
        String[] files = path.list();
        assertNotNull(files);
        assertEquals(2, files.length); // B and C should be filtered out

        assertEquals(new File("test/buildlist/A/build.xml").getAbsolutePath(), new File(files[0]).getAbsolutePath());
        assertEquals(new File("test/buildlist/D/build.xml").getAbsolutePath(), new File(files[1]).getAbsolutePath());
View Full Code Here

                        boolean shouldBeEqual = expectSame[calls++];
                        if (received == null) {
                            assertTrue(msg, !shouldBeEqual);
                        } else {
                            String[] l1 = expect.list();
                            String[] l2 = received.list();
                            if (l1.length == l2.length) {
                                for (int i=0; i<l1.length; i++) {
                                    if (!l1[i].equals(l2[i])) {
                                        assertTrue(msg, !shouldBeEqual);
                                    }
View Full Code Here

        incl.setMethod("set*");
        filters.addInclude(incl);
        report.setReportFilters(filters);
        Path p = new Path(null);
        p.addJavaRuntime();
        Document doc = report.createDocument(p.list());

        Node snapshot = doc.getDocumentElement();
        assertEquals("snapshot", snapshot.getNodeName());

        // there is only java.util
View Full Code Here

                toBeDeleted = setToPath(allTargetSet);
            } else {
                toBeDeleted = setToPath(targetSet);
            }

            String[] names = toBeDeleted.list();
            for (int i = 0; i < names.length; ++i) {
                File file = new File(names[i]);
                if (!file.exists()) {
                    continue;
                }
View Full Code Here

    private void verifyJarFilesExist() {
        Enumeration pathsEnum = paths.elements();
        Path p = null;
        while (pathsEnum.hasMoreElements()) {
            p = (Path)pathsEnum.nextElement();
            String files[] = p.list();
            for (int i=0;i<files.length;i++) {
                File file = new File(files[i]);

                if (!file.exists())
                    throw new BuildException(VisitorImpl.getNoFileMsg(file));
View Full Code Here

                        break;
                    }
                }
            }
            if (p != null) {
                String[] dirs = p.list();
                for (int i = 0; i < dirs.length; i++) {
                    executableFile
                        = FILE_UTILS.resolveFile(new File(dirs[i]), exec);
                    if (executableFile.exists()) {
                        return executableFile.getAbsolutePath();
View Full Code Here

     */
    public void setClassPath(Path classpath) {
        pathComponents.removeAllElements();
        if (classpath != null) {
            Path actualClasspath = classpath.concatSystemClasspath("ignore");
            String[] pathElements = actualClasspath.list();
            for (int i = 0; i < pathElements.length; ++i) {
                try {
                    addPathElement(pathElements[i]);
                } catch (BuildException e) {
                    // ignore path elements which are invalid
View Full Code Here

            }
        }

        if (path != null) {
            Path p = new Path(getProject(), path);
            String[] pElements = p.list();
            for (int i = 0; i < pElements.length; i++) {
                File f = new File(pElements[i],
                                  "rpmbuild"
                                  + (Os.isFamily("dos") ? ".exe" : ""));
                if (f.canRead()) {
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.