Skip to content

Commit

Permalink
Added Script.include(String path) convenience extension method / func…
Browse files Browse the repository at this point in the history
…tion to make including external scripts easier.
  • Loading branch information
rednoah committed May 24, 2019
1 parent 0678aa6 commit 3ef7f62
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/net/filebot/format/ExpressionFormatFunctions.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ public static File getUserFile(Script context, Object path) {
}

return f;

}

public static Object include(Script context, Object path) throws Exception {
return context.evaluate(getUserFile(context, path));
}

private ExpressionFormatFunctions() {
Expand Down

0 comments on commit 3ef7f62

Please sign in to comment.