From 549e2e47a38cd20f9790acab88ed393818796fd9 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 29 Oct 2014 03:45:30 +0000 Subject: [PATCH] * added File.listTree() which might be useful for --filter expressions --- source/net/filebot/cli/ScriptShellMethods.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/net/filebot/cli/ScriptShellMethods.java b/source/net/filebot/cli/ScriptShellMethods.java index 6e0d2d5b..506e8f57 100644 --- a/source/net/filebot/cli/ScriptShellMethods.java +++ b/source/net/filebot/cli/ScriptShellMethods.java @@ -100,6 +100,10 @@ public class ScriptShellMethods { return DefaultGroovyMethods.find(FileUtilities.getChildren(self), closure) != null; } + public static List listTree(File self, int maxDepth) { + return FileUtilities.listFiles(singleton(self), maxDepth, false, true, true); + } + public static List getFiles(File self) { return getFiles(self, null); }