Protected
Optional
Internal
The file name that this fs.Dirent object refers to. The type of this value is determined by the options.encoding passed to readdir or readdirSync.
fs.Dirent
options.encoding
v10.10.0
The path to the parent directory of the file this fs.Dirent object refers to.
v20.12.0, v18.20.0
Removed in Node v24, use parentPath instead.
parentPath
Returns true if the fs.Dirent object describes a block device.
true
Returns true if the fs.Dirent object describes a character device.
Returns true if the fs.Dirent object describes a file system directory.
Returns true if the fs.Dirent object describes a first-in-first-out (FIFO) pipe.
Returns true if the fs.Dirent object describes a regular file.
Returns true if the fs.Dirent object describes a socket.
Returns true if the fs.Dirent object describes a symbolic link.
Static
The file name that this
fs.Dirent
object refers to. The type of this value is determined by theoptions.encoding
passed to readdir or readdirSync.