ramblings/oxygen/js-debugger-include/commons.js

10 lines
482 B
JavaScript
Raw Normal View History

include = function (filepath, isAbsolute) {
if (isAbsolute === undefined || isAbsolute == false) {
filepath = Packages.ro.sync.ecss.extensions.commons.operations.CommonsOperationsUtil.expandAndResolvePath(authorAccess, filepath);
2021-04-25 10:22:17 +00:00
}
Packages.java.lang.System.out.println('filepath: ' + filepath );
var text = new java.lang.String(java.nio.file.Files.readAllBytes(java.nio.file.Paths. get (java.net.URI(filepath))));
text = String(text);
eval(text);
2021-04-25 10:22:17 +00:00
}