| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3ed0492 commit 89aba0c
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7386,6 +7386,13 @@ Additionally, when [`fs.readdir()`][] or [`fs.readdirSync()`][] is called with | |||
| 7386 | 7386 | the `withFileTypes` option set to `true`, the resulting array is filled with | |
| 7387 | 7387 | {fs.Dirent} objects, rather than strings or {Buffer}s. | |
| 7388 | 7388 | ||
| 7389 | + When a directory is read, such as with [`fs.readdir()`][] or | ||
| 7390 | + [`fs.opendir()`][], the file type of each entry is the type reported by the | ||
| 7391 | + operating system and may depend on the file system; for example, some file | ||
| 7392 | + systems may report a type that differs from what [`fs.lstat()`][] returns. | ||
| 7393 | + Node.js calls [`fs.lstat()`][] on such an entry only when the reported type | ||
| 7394 | + is unknown. Use [`fs.lstat()`][] when an accurate file type is required. | ||
| 7395 | + | ||
| 7389 | 7396 | #### `dirent.isBlockDevice()` | |
| 7390 | 7397 | ||
| 7391 | 7398 | <!-- YAML | |
| Back | FazBrowse Home | New Git URL |
0 commit comments