1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 16:28:51 -05:00

add File.resolveAsChild

This commit is contained in:
Reinhard Pointner 2015-12-11 22:28:34 +00:00
parent 7ea5b88011
commit b87e662466

View File

@ -56,6 +56,10 @@ public class ScriptShellMethods {
return new File(self.getParentFile(), name);
}
public static File resolveAsChild(File self, File folder) {
return self.isAbsolute() ? self : new File(folder, self.getPath());
}
public static List<File> listFiles(File self, Closure<?> closure) {
return DefaultGroovyMethods.findAll(FileUtilities.getChildren(self), closure);
}