This is the mail archive of the
mailing list for the Cygwin project.
Re: [PATCH 3/4] Make io_stream::exists() directory aware
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-apps at cygwin dot com
- Date: Fri, 17 Dec 2010 11:24:56 +0100
- Subject: Re: [PATCH 3/4] Make io_stream::exists() directory aware
- References: <email@example.com> <firstname.lastname@example.org> <20101129112832.GB7001@calimero.vinschen.de> <4D0A6AA0.email@example.com> <4D0A894F.firstname.lastname@example.org>
- Reply-to: cygwin-apps at cygwin dot com
On Dec 16 22:49, Peter Rosin wrote:
> Den 2010-12-16 20:38 skrev Jon TURNEY:
> > On 29/11/2010 11:28, Corinna Vinschen wrote:
> >> I would prefer if you would use GetFileAttributesA here, just like the
> >> io_stream_file::exists method. This also unifies testing the
> >> attributes.
> > Oh, I used _stat() in the !IsWindowsNT() case as MSDN tells me that
> > GetFileAttributes() isn't available prior to Win2K. I guess I've been misled :-)
Very much. GetFileAttributes is a function which already existed in
> That's just MS trying to rewrite history now that Win2k is is the oldest
> supported OS. According to MSDN, no API predates Win2k. Stupid if you
> ask me...
Right. That's very annoying and it's not easy now to find out which API
existed prior to W2K using the MSDN docs. However, there is one way:
This points to a list of Windows functions as they have been introduced
on a pre-release base. If you have a function which is documented to
exist since Windows 2000, but which is not in the list of functions
introduced with Windows 2000
then the function already existed since at least Windows NT4 SP4.
Even easier is this: If it's in the w32api headers and if it's not
bracketed with something like
#if (_WIN32_WINNT >= 0x0500)
then it's an old function which already existed in 95/98/Me/NT4.
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com