Commit 29a083c
authored
doc: clarify how fs.Dirent file types are determined
The file type of a directory entry returned by fs.readdir() or
fs.opendir() is the type reported by the operating system's directory
listing. Node.js falls back to lstat() only when the reported type is
unknown, and some file systems may report a type that differs from what
lstat() would return. Document this in the fs.Dirent class introduction,
with fs.lstat() as the accurate alternative.
Fixes: #30646
Signed-off-by: Julian Soreavis <julian.soreavis@gmail.com>
PR-URL: #64532
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>1 parent b2b2b41 commit 29a083c
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7407 | 7407 | | |
7408 | 7408 | | |
7409 | 7409 | | |
| 7410 | + | |
| 7411 | + | |
| 7412 | + | |
| 7413 | + | |
| 7414 | + | |
| 7415 | + | |
| 7416 | + | |
7410 | 7417 | | |
7411 | 7418 | | |
7412 | 7419 | | |
| |||
0 commit comments