From 892e0d70fba736395c958adec6193fd43680d79b Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Fri, 27 Jan 2017 17:45:17 +0800 Subject: [PATCH] Added File.getTail() e.g. {plex.tail} --- source/net/filebot/format/ExpressionFormatMethods.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/net/filebot/format/ExpressionFormatMethods.java b/source/net/filebot/format/ExpressionFormatMethods.java index 5d66a36a..beb092a0 100644 --- a/source/net/filebot/format/ExpressionFormatMethods.java +++ b/source/net/filebot/format/ExpressionFormatMethods.java @@ -468,6 +468,10 @@ public class ExpressionFormatMethods { return FileUtilities.listPath(self).get(0); } + public static File getTail(File self) { + return FileUtilities.getRelativePathTail(self, FileUtilities.listPath(self).size() - 1); + } + public static List listPath(File self) { return FileUtilities.listPath(self); }