From 17c3fc67cf173b9919ad431447be75f9e88b5d24 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 25 Apr 2019 17:56:57 +0300 Subject: [PATCH] doc,fs: document value of stats.isDirectory on symbolic links PR-URL: https://github.com/nodejs/node/pull/27413 Reviewed-By: James M Snell Reviewed-By: Antoine du Hamel --- doc/api/fs.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/api/fs.md b/doc/api/fs.md index 82a3ae7deb8e44..13a081382c36c7 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -826,6 +826,10 @@ added: v0.1.10 Returns `true` if the `fs.Stats` object describes a file system directory. +If the `fs.Stats` object was obtained from [`fs.lstat()`][], this method will +always return `false`. This is because [`fs.lstat()`][] returns information +about a symbolic link itself and not the path it resolves to. + ### `stats.isFIFO()`