help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: access() function does not work under windows


From: FÖLDY Lajos
Subject: Re: access() function does not work under windows
Date: Sun, 27 May 2007 19:58:11 +0200


On Fri, 25 May 2007, yazwas wrote:

Hello,
I'm trying to write a cross platform directory lister and copier,
using standard C/C++, I'm using MinGW under windows, and I'm trying to
use access() function to get file/dir permission, but it does not
work, I'm getting ok all the time, my code is something like this
if(access(dir, X_OK) != 0)
           ...... do something,

but it never gives -1, its always 0 even for directories I don't have
permission to,

does anyone has any idea why is this happening under windows, for
linux its ok, but windows its another story,

thankx in advance,



X_OK is ignored for access() in the MSVCRT.DLL library, and true is returned. (Windows Vista has an updated MSVCRT.DLL which returns false.)

regards,
lajos



reply via email to

[Prev in Thread] Current Thread [Next in Thread]