Skip to content

Commit

Permalink
Merge pull request #1544 from PeterVoronov/node_fs_constants
Browse files Browse the repository at this point in the history
Make `node:fs` `constants` available thru the `protectFS`
  • Loading branch information
klein0r committed Apr 10, 2024
2 parents 7455dda + 486ed4a commit af09773
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/protectFs.js
Expand Up @@ -377,6 +377,9 @@ const ProtectFs = function (log, ioBrokerDataDir) {
}
};

// Add missing constants
this.constants = nodeFS.constants;

// Add missing functions
for (const m in nodeFS) {
if (typeof nodeFS[m] === 'function' && Object.hasOwn(nodeFS, m) && !Object.hasOwn(this, m)) {
Expand Down

0 comments on commit af09773

Please sign in to comment.