|
|
Subscribe / Log in / New account

The trouble with symbolic links

The trouble with symbolic links

Posted Jul 9, 2022 11:55 UTC (Sat) by mathstuf (subscriber, #69389)
In reply to: The trouble with symbolic links by Subsentient
Parent article: The trouble with symbolic links

> Please use stat() instead of lstat() whenever possible.

One place you can't is when asking "does this path exist?" because `stat` will return "no" for broken (or looped) symlinks while `lstat` will say "yes".


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds