Package org.apache.tools.ant.taskdefs

Examples of org.apache.tools.ant.taskdefs.Delete$ReverseDirs


        del.setDir(new File("build/test/deliver"));
        del.execute();
    }

    private void cleanRep() {
        Delete del = new Delete();
        del.setProject(new Project());
        del.setDir(new File("test/repositories/1/apache"));
        del.execute();
    }
View Full Code Here


        try
        {
            err.clear();
            out.clear();

            Delete del = new Delete();
            del.setProject(project);
            del.setDir(new File(dir));
            del.execute();
            return true;
        }
        catch (Exception ex)
        {
            return false;
View Full Code Here

                }
                ftp.deleteFile(ftpFiles[0].getName());
            }
            // delegate the deletion of the local temp file to the delete task
            // because of race conditions occuring on Windows
            Delete mydelete = new Delete();
            mydelete.bindToOwner(task);
            mydelete.setFile(tempFile.getCanonicalFile());
            mydelete.execute();
        } catch (Exception e) {
            throw new BuildException(e, task.getLocation());
        }
        return returnValue;
    }
View Full Code Here

                }
                ftp.deleteFile(ftpFiles[0].getName());
            }
            // delegate the deletion of the local temp file to the delete task
            // because of race conditions occuring on Windows
            Delete mydelete = new Delete();
            mydelete.bindToOwner(this);
            mydelete.setFile(tempFile.getCanonicalFile());
            mydelete.execute();
        } catch (Exception e) {
            throw new BuildException(e, getLocation());
        }
        return returnValue;
    }
View Full Code Here

     * @param theTmpDir the temp directory to clean
     */
    protected void cleanTempDirectory(File theTmpDir)
    {
        // Clean up stuff previously put in the temporary directory
        Delete delete = (Delete) createAntTask("delete");
        FileSet fileSet = new FileSet();
        fileSet.setDir(theTmpDir);
        fileSet.createInclude().setName("**/*");
        delete.addFileset(fileSet);
        delete.setIncludeEmptyDirs(true);
        delete.setFailOnError(false);
        delete.execute();
    }
View Full Code Here

        } catch (ClassNotFoundException x) {
            Assume.assumeNoException("Skip test on JDK 6 and below", x);
        }
        final File d = new File(System.getProperty("java.io.tmpdir"), "XMLResultAggregatorTest");
        if (d.exists()) {
            new Delete() {{removeDir(d);}}; // is there no utility method for this?
        }
        assertTrue(d.getAbsolutePath(), d.mkdir());
        File xml = new File(d, "x.xml");
        PrintWriter pw = new PrintWriter(new FileOutputStream(xml));
        try {
View Full Code Here

                }
                ftp.deleteFile(ftpFiles[0].getName());
            }
            // delegate the deletion of the local temp file to the delete task
            // because of race conditions occuring on Windows
            Delete mydelete = new Delete();
            mydelete.bindToOwner(task);
            mydelete.setFile(tempFile.getCanonicalFile());
            mydelete.execute();
        } catch (Exception e) {
            throw new BuildException(e, task.getLocation());
        }
        return returnValue;
    }
View Full Code Here

                }
                ftp.deleteFile(ftpFiles[0].getName());
            }
            // delegate the deletion of the local temp file to the delete task
            // because of race conditions occuring on Windows
            Delete mydelete = new Delete();
            mydelete.bindToOwner(this);
            mydelete.setFile(tempFile.getCanonicalFile());
            mydelete.execute();
        } catch (Exception e) {
            throw new BuildException(e, getLocation());
        }
        return returnValue;
    }
View Full Code Here

    protected void tearDown() throws Exception {
        cleanCache();
    }

    private void cleanCache() {
        Delete del = new Delete();
        del.setProject(new Project());
        del.setDir(_cache);
        del.execute();
    }
View Full Code Here

    protected void tearDown() throws Exception {
        cleanCache();
    }

    private void cleanCache() {
        Delete del = new Delete();
        del.setProject(new Project());
        del.setDir(_cache);
        del.execute();
    }
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.taskdefs.Delete$ReverseDirs

Copyright © 2018 www.massapicom. 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.