2014-07-10 9:04 GMT+02:00 Paul Moore <p.f.mo...@gmail.com>: > As someone (Tim?) pointed out later in the thread, > FindFirstFile/FindNextFile doesn't follow symlinks by default (and nor > do the dirent entries on Unix). So whether or not it's "natural", the > "free" functionality provided by the OS is that of lstat, not that of > stat. Presumably because it's possible to build symlink-following code > on top of non-following code, but not the other way around.
DirEntry methods will remain free (no syscall) for directories and regular files. One extra syscall will be needed only for symlinks, which are more rare than other file types (for example, you wrote " Windows typically makes little use of symlinks"). See my pseudo-code: https://mail.python.org/pipermail/python-dev/2014-July/135439.html On Windows, _lstat and _stat attributes will be filled directly in the constructor on Windows for regular files and directories. Victor _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com