diff options
author | 2022-10-05 17:57:14 -0700 | |
---|---|---|
committer | 2022-10-05 18:07:41 -0700 | |
commit | 18ae17871d1e69ebaad52119aef648bf60761fd2 (patch) | |
tree | 4e46751c63361af5e573f3ffd3d9d6edfa47d11c /src | |
parent | 09ebb217dd31149b280361d9a49d67da58003fde (diff) | |
download | bun-18ae17871d1e69ebaad52119aef648bf60761fd2.tar.gz bun-18ae17871d1e69ebaad52119aef648bf60761fd2.tar.zst bun-18ae17871d1e69ebaad52119aef648bf60761fd2.zip |
Export `rm` in fs/promises
Diffstat (limited to 'src')
-rw-r--r-- | src/bun.js/fs_promises.exports.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bun.js/fs_promises.exports.js b/src/bun.js/fs_promises.exports.js index c1dce2291..6f15565a4 100644 --- a/src/bun.js/fs_promises.exports.js +++ b/src/bun.js/fs_promises.exports.js @@ -1,5 +1,11 @@ var fs = Bun.fs(); +var _stat = fs.statSync; +fs.statSync = function (path) { + console.trace("stat", path); + return _stat(path); +}; + // note: this is not quite the same as how node does it // in some cases, node swaps around arguments or makes small tweaks to the return type // this is just better than nothing. @@ -68,6 +74,7 @@ export var truncate = promisify(fs.truncateSync); export var unlink = promisify(fs.unlinkSync); export var utimes = promisify(fs.utimesSync); export var lutimes = promisify(fs.lutimesSync); +export var rm = promisify(fs.rmSync); export default { access, @@ -105,4 +112,7 @@ export default { unlink, utimes, lutimes, + rm, + + [Symbol.for("CommonJS")]: 0, }; |