[issue21719] Returning Windows file attribute information via os.stat()

STINNER Victor report at bugs.python.org
Wed Jun 11 16:35:30 CEST 2014


STINNER Victor added the comment:

> Instead of the somewhat cryptic name "winattrs", I suggest to call it st_file_attributes (...)

On Windows, os.stat() calls GetFileInformationByHandle() which fills a BY_HANDLE_FILE_INFORMATION structure, and this structure has a dwFileAttributes attribute. The os.stat() calls also GetFileType().
http://msdn.microsoft.com/en-us/library/windows/desktop/aa364952%28v=vs.85%29.aspx

So I agree that os.stat().st_file_attributes is less surprising for Windows developers and it is more homogenous with FILE_ATTRIBUTE_xxx constants.

----------
nosy: +haypo

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21719>
_______________________________________


More information about the Python-bugs-list mailing list