prototype.exe 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/prototype.js +2 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prototype.exe",
3
3
  "description": "JScript",
4
- "version": "0.0.9",
4
+ "version": "0.0.10",
5
5
  "main": "src/prototype.js",
6
6
  "files": [
7
7
  "src/",
package/src/prototype.js CHANGED
@@ -689,6 +689,8 @@ Define (Function, "path", function () {});
689
689
  Define (Function.path, "require", function (api) { return Function.path.api = api; });
690
690
  Define (Function.path, "join", function (... path) { return Function.path.api.join (... path); });
691
691
  Define (Function.path, "exist", function (... path) { return Function.file.api.existsSync (Function.path.api.join (... path)); });
692
+ Define (Function.path, "access", function (path, io) { return Function.file.api.accessSync (path, io); });
693
+ Define (Function.path.access, "write", function (path) { try { Function.path.access (path, Function.file.api.constants.W_OK); return true; } catch (e) { return false; } });
692
694
  Define (Function.path, "current", function (path) { return "./" + path; });
693
695
  Define (Function.path, "io", function (io) { if (Array.isArray (io)) Function.path.io.value = io; else return Function.path.io.value.includes (io); });
694
696
  Function.path.io ([]);