Commit b070d02
committed
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>1 parent cf882a7 commit b070d02
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7336 | 7336 | | |
7337 | 7337 | | |
7338 | 7338 | | |
| 7339 | + | |
| 7340 | + | |
| 7341 | + | |
| 7342 | + | |
| 7343 | + | |
| 7344 | + | |
| 7345 | + | |
7339 | 7346 | | |
7340 | 7347 | | |
7341 | 7348 | | |
| |||
0 commit comments