JS: Add __filepath and __dirpath globals.

This commit is contained in:
Derek Jamison
2024-03-26 21:09:41 -05:00
parent 6553f407cd
commit ea9f151213
2 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
let storage = require("storage");
print("script has __dirpath of" + __dirpath);
print("script has __filepath of" + __filepath);
if (storage.exists(__dirpath + "/math.js")) {
print("math.js exist here.");
} else {
print("math.js does not exist here.");
}