Skip to content

Commit 09ff9ea

Browse files
mertcanaltintargos
authored andcommitted
doc,fs: update description of fs.stat() method
PR-URL: #47654 Fixes: #47633 Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]>
1 parent 5b851c8 commit 09ff9ea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

doc/api/fs.md

+3
Original file line numberDiff line numberDiff line change
@@ -4126,6 +4126,9 @@ Asynchronous stat(2). The callback gets two arguments `(err, stats)` where
41264126

41274127
In case of an error, the `err.code` will be one of [Common System Errors][].
41284128

4129+
[`fs.stat()`][] follows symbolic links. Use [`fs.lstat()`][] to look at the
4130+
links themselves.
4131+
41294132
Using `fs.stat()` to check for the existence of a file before calling
41304133
`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended.
41314134
Instead, user code should open/read/write the file directly and handle the

0 commit comments

Comments
 (0)