Example usage for org.aspectj.util FileUtil deleteContents

List of usage examples for org.aspectj.util FileUtil deleteContents

Introduction

In this page you can find the example usage for org.aspectj.util FileUtil deleteContents.

Prototype

public static int deleteContents(File dir, FileFilter filter, boolean deleteEmptyDirs) 

Source Link

Document

Recursively delete some contents of dir, but not the dir itself.

Usage

From source file:org.eclipse.ajdt.core.ant.AJDT_AjcCompilerAdapter.java

License:Open Source License

/**
 * If destDir exists and property CLEAN is set, 
 * this cleans out the dest dir of any .class files,
 * and returns true to signal a recursive call.
 * @return true if destDir was cleaned./* www  .j a  v a  2  s .  co  m*/
 */
private boolean afterCleaningDirs() {
    String clean = javac.getProject().getProperty(CLEAN);
    if (null == clean) {
        return false;
    }
    File destDir = javac.getDestdir();
    if (null == destDir) {
        javac.log(CLEAN + " specified, but no dest dir to clean", Project.MSG_WARN);
        return false;
    }
    javac.log(CLEAN + " cleaning .class files from " + destDir, Project.MSG_VERBOSE);
    FileUtil.deleteContents(destDir, FileUtil.DIRS_AND_WRITABLE_CLASSES, true);
    return true;
}