Example usage for org.aspectj.util FileUtil DIRS_AND_WRITABLE_CLASSES

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

Introduction

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

Prototype

FileFilter DIRS_AND_WRITABLE_CLASSES

To view the source code for org.aspectj.util FileUtil DIRS_AND_WRITABLE_CLASSES.

Click Source Link

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.//w  w w .ja v  a 2  s .  c o 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;
}