Antoine Pitrou wrote:
So what? The behaviour of fetching the canonical name can be added to the behaviour of resolving symlinks.
Finding the actual name (I wouldn't call it "canonical", since that term could be ambiguous) requires reading the contents of entire directories at each step, which could be noticeably less efficient than what realpath() currently does. Users who only want symlinks expanded might object to that.
An option could be added to realpath(), but then we're into constant-parameter territory.