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 8651ea8

Browse filesBrowse files
mertcanaltinMoLow
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 d4eecb5 commit 8651ea8
Copy full SHA for 8651ea8

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
@@ -4066,6 +4066,9 @@ Asynchronous stat(2). The callback gets two arguments `(err, stats)` where
40664066

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

4069+
[`fs.stat()`][] follows symbolic links. Use [`fs.lstat()`][] to look at the
4070+
links themselves.
4071+
40694072
Using `fs.stat()` to check for the existence of a file before calling
40704073
`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended.
40714074
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.