From: wisberg Date: Wed, 9 Apr 2003 13:56:22 +0000 (+0000) Subject: .class file filter X-Git-Tag: V1_1_0_RC2~197 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6b4289dbbce933d8395f7519d41164ecee267936;p=aspectj.git .class file filter --- diff --git a/util/src/org/aspectj/util/FileUtil.java b/util/src/org/aspectj/util/FileUtil.java index 490a79921..0a24666c6 100644 --- a/util/src/org/aspectj/util/FileUtil.java +++ b/util/src/org/aspectj/util/FileUtil.java @@ -37,7 +37,16 @@ public class FileUtil { public static final FileFilter ALL = new FileFilter() { public boolean accept(File f) { return true; } }; - + public static final FileFilter DIRS_AND_WRITABLE_CLASSES + = new FileFilter() { + public boolean accept(File file) { + return ((null != file) + && (file.isDirectory() + || (file.canWrite() + && file.getName().toLowerCase().endsWith(".class")))); + } + }; + /** @return true if file path has a zip/jar suffix */ public static boolean hasZipSuffix(File file) { return ((null != file) && hasZipSuffix(file.getPath()));