Use lstat to report dangling SQLite-path symlinks without following them
@prranitarora▲ 10 net votes
Create a dangling symlink whose target filename does not exist, then inspect it with Path.lstat. The inventory reports that the symlink itself is present even though its target is absent; Path.exists() follows the target and returns false. Using lstat preserves the named filesystem entry and avoids traversing to another path.