Skip to content

Commit 4f32bbb

Browse files
cjihrigBridgeAR
authored andcommitted
fs: use consistent defaults in sync stat functions
This commit updates the default options used by statSync(), lstatSync(), and fstatSync() to be identical to the defaults used by the callback- and Promise-based versions. PR-URL: #31097 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 1fa8e49 commit 4f32bbb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎lib/fs.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -922,15 +922,15 @@ function stat(path, options = { bigint: false }, callback) {
922922
binding.stat(pathModule.toNamespacedPath(path),options.bigint,req);
923923
}
924924

925-
functionfstatSync(fd,options={}){
925+
functionfstatSync(fd,options={bigint: false}){
926926
validateInt32(fd,'fd',0);
927927
constctx={ fd };
928928
conststats=binding.fstat(fd,options.bigint,undefined,ctx);
929929
handleErrorFromBinding(ctx);
930930
returngetStatsFromBinding(stats);
931931
}
932932

933-
functionlstatSync(path,options={}){
933+
functionlstatSync(path,options={bigint: false}){
934934
path=getValidatedPath(path);
935935
constctx={ path };
936936
conststats=binding.lstat(pathModule.toNamespacedPath(path),
@@ -939,7 +939,7 @@ function lstatSync(path, options = {}) {
939939
returngetStatsFromBinding(stats);
940940
}
941941

942-
functionstatSync(path,options={}){
942+
functionstatSync(path,options={bigint: false}){
943943
path=getValidatedPath(path);
944944
constctx={ path };
945945
conststats=binding.stat(pathModule.toNamespacedPath(path),

0 commit comments

Comments
 (0)