summaryrefslogtreecommitdiff
path: root/lib/fs.js
diff options
context:
space:
mode:
authorTony Brix <tony@brix.ninja>2019-08-14 00:15:10 -0500
committerRich Trott <rtrott@gmail.com>2019-08-16 15:51:56 -0700
commit4111c57f7ca3fd2993b60e86bea2abe63d124c65 (patch)
tree2e524e5fa7fe8d4e4d2701e93b50c2d136fc8d9d /lib/fs.js
parent841df6a9b68f431129343c49fc9bb6ed4d83f89b (diff)
downloadandroid-node-v8-4111c57f7ca3fd2993b60e86bea2abe63d124c65.tar.gz
android-node-v8-4111c57f7ca3fd2993b60e86bea2abe63d124c65.tar.bz2
android-node-v8-4111c57f7ca3fd2993b60e86bea2abe63d124c65.zip
fs: add default options for *stat()
PR-URL: https://github.com/nodejs/node/pull/29114 Fixes: https://github.com/nodejs/node/issues/29113 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'lib/fs.js')
-rw-r--r--lib/fs.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/fs.js b/lib/fs.js
index baba33a6a2..2ca3bdf21a 100644
--- a/lib/fs.js
+++ b/lib/fs.js
@@ -796,7 +796,7 @@ function readdirSync(path, options) {
return options.withFileTypes ? getDirents(path, result) : result;
}
-function fstat(fd, options, callback) {
+function fstat(fd, options = { bigint: false }, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
@@ -807,7 +807,7 @@ function fstat(fd, options, callback) {
binding.fstat(fd, options.bigint, req);
}
-function lstat(path, options, callback) {
+function lstat(path, options = { bigint: false }, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
@@ -819,7 +819,7 @@ function lstat(path, options, callback) {
binding.lstat(pathModule.toNamespacedPath(path), options.bigint, req);
}
-function stat(path, options, callback) {
+function stat(path, options = { bigint: false }, callback) {
if (typeof options === 'function') {
callback = options;
options = {};