Dirent

The object Node.js uses for one directory entry, with its name and methods such as isFile() and isDirectory().

In more detail

Its type information comes from reading the directory itself, so no extra stat call is needed per file. Call dirent.isFile(), isDirectory() or isSymbolicLink() to check the type, and use dirent.parentPath to build the full path.

Related terms

Taught in

References