* added File.listTree() which might be useful for --filter expressions

This commit is contained in:
Reinhard Pointner 2014-10-29 03:45:30 +00:00
parent 834b8b5205
commit 549e2e47a3
1 changed files with 4 additions and 0 deletions

View File

@ -100,6 +100,10 @@ public class ScriptShellMethods {
return DefaultGroovyMethods.find(FileUtilities.getChildren(self), closure) != null; return DefaultGroovyMethods.find(FileUtilities.getChildren(self), closure) != null;
} }
public static List<File> listTree(File self, int maxDepth) {
return FileUtilities.listFiles(singleton(self), maxDepth, false, true, true);
}
public static List<File> getFiles(File self) { public static List<File> getFiles(File self) {
return getFiles(self, null); return getFiles(self, null);
} }