diff options
author | wisberg <wisberg> | 2003-04-09 13:56:22 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2003-04-09 13:56:22 +0000 |
commit | 6b4289dbbce933d8395f7519d41164ecee267936 (patch) | |
tree | 88fc66ef7a2719ee96209b04227b77533a37f9b9 /util | |
parent | 9045d470089aa58a4c7dab743468d0206ad6dd68 (diff) | |
download | aspectj-6b4289dbbce933d8395f7519d41164ecee267936.tar.gz aspectj-6b4289dbbce933d8395f7519d41164ecee267936.zip |
.class file filter
Diffstat (limited to 'util')
-rw-r--r-- | util/src/org/aspectj/util/FileUtil.java | 11 |
1 files changed, 10 insertions, 1 deletions
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())); |