I am trying to remove a set of directories, excluding those that are in used and symlink
ed to elsewhere.
What is the most effective way to determine if a given directory is symlink
ed to?
I've tried os.stat(dir).mt_nlink
, but it returns 3
even for directories I want to remove.
EDIT:
By symlinked
to I mean this directory is a target of some symlink.