Skip to content

Commit 85cf305

Browse files
coderaiserdanielleadams
authored andcommitted
doc,fs: document value of stats.isDirectory on symbolic links
PR-URL: #27413 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent eea7e3b commit 85cf305

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/api/fs.md

+4
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,10 @@ added: v0.1.10
826826

827827
Returns `true` if the `fs.Stats` object describes a file system directory.
828828

829+
If the `fs.Stats` object was obtained from [`fs.lstat()`][], this method will
830+
always return `false`. This is because [`fs.lstat()`][] returns information
831+
about a symbolic link itself and not the path it resolves to.
832+
829833
### `stats.isFIFO()`
830834
<!-- YAML
831835
added: v0.1.10

0 commit comments

Comments
 (0)