mirror of
https://github.com/mitb-archive/filebot
synced 2025-03-10 06:20:27 -04:00
Move DSL utilities
This commit is contained in:
parent
13cfca422c
commit
2911ea488a
@ -47,30 +47,6 @@ import net.filebot.web.WebRequest;
|
||||
|
||||
public class ScriptShellMethods {
|
||||
|
||||
public static File plus(File self, String path) {
|
||||
return new File(self.getPath().concat(path));
|
||||
}
|
||||
|
||||
public static File div(File self, String path) {
|
||||
return new File(self, path);
|
||||
}
|
||||
|
||||
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 File div(String self, File path) {
|
||||
return new File(self, path.getPath());
|
||||
}
|
||||
|
||||
public static String negative(String self) {
|
||||
return '-' + self;
|
||||
}
|
||||
|
||||
public static String getAt(File self, int index) {
|
||||
return FileUtilities.listPath(self).get(index).getName();
|
||||
}
|
||||
|
@ -649,6 +649,33 @@ public class ExpressionFormatMethods {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* DSL utilities
|
||||
*/
|
||||
public static File plus(File self, String path) {
|
||||
return new File(self.getPath().concat(path));
|
||||
}
|
||||
|
||||
public static File div(File self, String path) {
|
||||
return new File(self, path);
|
||||
}
|
||||
|
||||
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 File div(String self, File path) {
|
||||
return new File(self, path.getPath());
|
||||
}
|
||||
|
||||
public static String negative(String self) {
|
||||
return '-' + self;
|
||||
}
|
||||
|
||||
private ExpressionFormatMethods() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user