-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fs.stat(filepath).isSymbolicLink() always returns false #37456
Comments
Okay, thanks to this answer https://stackoverflow.com/a/43443328/11468937 in order to my example will work it requires to change So, although it is not a bug, but it's not obvious behaviour for people that works with the file system the first time. I think it should be noted in the documentation https://nodejs.org/api/fs.html#fs_fspromises_stat_path_options that |
Did you see this: https://nodejs.org/api/fs.html#fs_stats_issymboliclink
|
What steps will reproduce the bug?
Run this script in a folder with a symbolic link to a file/directory.
Use
mklink file_slink.js file.js
to create a slink for a file.Use
mklink /D dir_slink dir
to create a slink for a directory.How often does it reproduce? Is there a required condition?
Always. No.
What is the expected behavior?
stat.isSymbolicLink()
returnstrue
for a symbolic link.Output:
What do you see instead?
Additional information
fs.stat(filepath).isSymbolicLink()
should returntrue
for a symbolic link.The text was updated successfully, but these errors were encountered: