A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2007-November/075113.html below:

[Python-Dev] Special file "nul" in Windows and os.stat

[Python-Dev] Special file "nul" in Windows and os.stat [Python-Dev] Special file "nul" in Windows and os.stat"Martin v. Löwis" martin at v.loewis.de
Sat Nov 3 14:42:01 CET 2007
>> That doesn't really answer the question, though - you merely state
>> that Python 2.4 calls the CRT, but then my question is still what
>> kernel32 functions are called to have stat on NUL succeed.
>>
> 
> I'm not 100% (it calls it through a function pointer and I'm not sure
> I tracked it down correctly), but I think it calls it through the C
> stat() function. In other words, it doesn't use any kernel32 functions
> directly, it calls the stat() that's exported from the MSVCRT.

Sure - but what does stat then do when passed NUL?

> GetFileAttributes() doesn't return those, just the FAT filesystem
> attributes. GetFileSize and GetFileTime fail.

Ok, so how does msvcrt stat() manage to fill these fields if those
functions fail?

Regards,
Martin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4