From 6b4289dbbce933d8395f7519d41164ecee267936 Mon Sep 17 00:00:00 2001 From: wisberg Date: Wed, 9 Apr 2003 13:56:22 +0000 Subject: [PATCH] .class file filter --- util/src/org/aspectj/util/FileUtil.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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())); -- 2.39.5