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

10 lines
482 B
JavaScript

include = function (filepath, isAbsolute) {
if (isAbsolute === undefined || isAbsolute == false) {
filepath = Packages.ro.sync.ecss.extensions.commons.operations.CommonsOperationsUtil.expandAndResolvePath(authorAccess, filepath);
}
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);
}