Brian
Brian

Reputation: 2147

Symlinks in Linux/PHP

Using PHP on Linux, I can just use the is_link() function to detect whether a given file is a symbolic link. However, is there a way to detect if a given file is the target of any other symbolic links?

Thanks, Brian

Upvotes: 0

Views: 434

Answers (1)

DigitalRoss
DigitalRoss

Reputation: 146053

No.

And this is not even possible with ordinary links.

Periodically, a Unix-like-OS (and for that matter, a Windows version) ships with cron setup to keep a database of files in order to speed up searching. Such a database certainly could map files and links in both directions but it would not necessarily give currently accurate results.

Upvotes: 3

Related Questions