GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: clarify how fs.Dirent file types are determined · nodejs/node@89aba0c

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • fs.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/fs.md‎

Copy file name to clipboardExpand all lines: doc/api/fs.md
+7Lines changed: 7 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -7386,6 +7386,13 @@ Additionally, when [`fs.readdir()`][] or [`fs.readdirSync()`][] is called with
73867386
the `withFileTypes` option set to `true`, the resulting array is filled with
73877387
{fs.Dirent} objects, rather than strings or {Buffer}s.
73887388
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+
73897396
#### `dirent.isBlockDevice()`
73907397
73917398
<!-- YAML

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.