From 42459b5c459874d89717eee29aadefbd9a0823a8 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Mon, 10 Oct 2016 05:39:25 +0800 Subject: [PATCH] Added File.div(File) to support `plex[0]/az/plex[1..-1]` style formats --- source/net/filebot/cli/ScriptShellMethods.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/source/net/filebot/cli/ScriptShellMethods.java b/source/net/filebot/cli/ScriptShellMethods.java index 4d20fc6c..59e5909a 100644 --- a/source/net/filebot/cli/ScriptShellMethods.java +++ b/source/net/filebot/cli/ScriptShellMethods.java @@ -40,16 +40,20 @@ import net.filebot.web.WebRequest; public class ScriptShellMethods { - public static File plus(File self, String name) { - return new File(self.getPath().concat(name)); + public static File plus(File self, String path) { + return new File(self.getPath().concat(path)); } - public static File div(File self, String name) { - return new File(self, name); + public static File div(File self, String path) { + return new File(self, path); } - public static File div(String self, String name) { - return new File(self, name); + public static File div(String self, String path) { + return new File(self, path); + } + + public static File div(File self, File path) { + return new File(self, path.getPath()); } public static String getAt(File self, int index) {