| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -796,7 +796,7 @@ function readdirSync(path, options) { | |||
| 796 | 796 | return options.withFileTypes ? getDirents(path, result) : result; | |
| 797 | 797 | } | |
| 798 | 798 | ||
| 799 | - function fstat(fd, options, callback) { | ||
| 799 | + function fstat(fd, options = { bigint: false }, callback) { | ||
| 800 | 800 | if (typeof options === 'function') { | |
| 801 | 801 | callback = options; | |
| 802 | 802 | options = {}; | |
@@ -807,7 +807,7 @@ function fstat(fd, options, callback) { | |||
| 807 | 807 | binding.fstat(fd, options.bigint, req); | |
| 808 | 808 | } | |
| 809 | 809 | ||
| 810 | - function lstat(path, options, callback) { | ||
| 810 | + function lstat(path, options = { bigint: false }, callback) { | ||
| 811 | 811 | if (typeof options === 'function') { | |
| 812 | 812 | callback = options; | |
| 813 | 813 | options = {}; | |
@@ -819,7 +819,7 @@ function lstat(path, options, callback) { | |||
| 819 | 819 | binding.lstat(pathModule.toNamespacedPath(path), options.bigint, req); | |
| 820 | 820 | } | |
| 821 | 821 | ||
| 822 | - function stat(path, options, callback) { | ||
| 822 | + function stat(path, options = { bigint: false }, callback) { | ||
| 823 | 823 | if (typeof options === 'function') { | |
| 824 | 824 | callback = options; | |
| 825 | 825 | options = {}; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -154,3 +154,14 @@ fs.stat(__filename, common.mustCall(function(err, s) { | |||
| 154 | 154 | } | |
| 155 | 155 | ); | |
| 156 | 156 | }); | |
| 157 | + | ||
| 158 | + // Should not throw an error | ||
| 159 | + fs.stat(__filename, undefined, common.mustCall(() => {})); | ||
| 160 | + | ||
| 161 | + fs.open(__filename, 'r', undefined, common.mustCall((err, fd) => { | ||
| 162 | + // Should not throw an error | ||
| 163 | + fs.fstat(fd, undefined, common.mustCall(() => {})); | ||
| 164 | + })); | ||
| 165 | + | ||
| 166 | + // Should not throw an error | ||
| 167 | + fs.lstat(__filename, undefined, common.mustCall(() => {})); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments