Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 09ff9ea

Browse filesBrowse files
mertcanaltintargos
authored andcommitted
doc,fs: update description of fs.stat() method
PR-URL: #47654 Fixes: #47633 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: LiviaMedeiros <livia@cirno.name>
1 parent 5b851c8 commit 09ff9ea
Copy full SHA for 09ff9ea

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/fs.md‎

Copy file name to clipboardExpand all lines: doc/api/fs.md
+3Lines changed: 3 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.