www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - std.file.exists = 0 when the file exists.

reply Adam Lindberg <eproxus gmail.com> writes:
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
Aug 26 2005
parent reply Carlos Santander <csantander619 gmail.com> writes:
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
Aug 26 2005
parent reply Golodh <digitalmars.3.golodh spamgourmet.com> writes:
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 17 2008
next sibling parent Golodh <digitalmars.3.golodh spamgourmet.com> writes:
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
prev sibling parent Golodh <digitalmars.3.golodh spamgourmet.com> writes:
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