www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - std/file.d:833

on std/file.d:833

int exists(char[] name)
{
return access(toStringz(name),0) != 0;
}

however: man access

RETURN VALUE
On  success  (all requested permissions granted), zero is returned.  On
error (at least one bit in mode asked for a permission that is  denied,
or  some other error occurred), -1 is returned, and errno is set appro-
priately.


So it should be :

return access(toStringz(name),0) == 0;
Aug 08 2005