You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
posix.stat implements lstat that doesn't follow symlinks. Normal stat that follows symlinks is not available. The first issue is that people would expect stat to provide the semantics of stat, and get unexpected results. The second issue is that stat is not available.
It's an interesting case. posix.stat() has been unconditionally using lstat() underneath ever since its addition in 2004. Kinda amazing that it took 21 years for anybody to notice, or at least, complain. Sometimes you need lstat() and sometimes you need stat(), and obviously we should provide access to both. It's just that at this point we cannot touch the existing posix.stat() because who knows what disasters may occur.
We could add a flag argument to change the meaning but it'd be kinda reverse from what you expect. Alternatively we'd need to come up with some other name for the thing.
posix.stat
implementslstat
that doesn't follow symlinks. Normalstat
that follows symlinks is not available. The first issue is that people would expectstat
to provide the semantics ofstat
, and get unexpected results. The second issue is thatstat
is not available.AT_SYMLINK_NOFOLLOW
means that this implementslstat
semantics.The text was updated successfully, but these errors were encountered: