Thread overview
std.file.exists = 0 when the file exists.
Aug 26, 2005
Adam Lindberg
Aug 26, 2005
Carlos Santander
std.file.exists always returns 0
May 18, 2008
Golodh
May 18, 2008
Golodh
May 18, 2008
Golodh
August 26, 2005
When calling on std.file.exists(FileName) it returns 0 when the file exists. Is this correct? What are the truth values of ints in D? Surely must 0 =3D false and 1 =3D true?

//Adam
August 26, 2005
Adam Lindberg escribió:
> When calling on std.file.exists(FileName) it returns 0 when the file
> exists. Is this correct? What are the truth values of ints in D?
> Surely must 0 =3D false and 1 =3D true?
> 
> //Adam

It was already reported and Walter said he was going to fix it in the next release.

-- 
Carlos Santander Bernal
May 18, 2008
Sorry to revisit this thread, but for me

std.file.exists(name)

_always_ returns false. Whether the file exists or not. Same with directories.

I am using digitalmars D v 1.028 under Windows XP.
May 18, 2008
I have to retract my previous claim.

I have been testing std.file.exists(name)  with a filename passed to my D program via an environment variable.

When I hard-code the name in the program source the function works, so the error is not in std.file.exists.



May 18, 2008
I have to retract my previous claim.

I have been testing std.file.exists(name)  with a filename passed to my D program via an environment variable.

When I hard-code the name in the program source the function works, so the error is not in std.file.exists.