Re: Why file.exists of relative path on Linux always return false?

2016-02-29 Thread Edwin van Leeuwen via Digitalmars-d-learn
On Monday, 29 February 2016 at 14:58:46 UTC, Alex Parrill wrote: On Monday, 29 February 2016 at 14:50:51 UTC, Suliman wrote: I am trying to check relative path on Linux for exists. string mypath = "~/Documents/imgs"; ~ is expanded by your shell. It is not a relative path, and system calls

Why file.exists of relative path on Linux always return false?

2016-02-29 Thread Suliman via Digitalmars-d-learn
I am trying to check relative path on Linux for exists. import std.stdio; import std.path; import std.file; import std.string; string mypath = "~/Documents/imgs"; void main() { if(!mypath.exists) { writeln(mypath, " do not exists"); }

Re: Why file.exists of relative path on Linux always return false?

2016-02-29 Thread Alex Parrill via Digitalmars-d-learn
On Monday, 29 February 2016 at 14:50:51 UTC, Suliman wrote: I am trying to check relative path on Linux for exists. import std.stdio; import std.path; import std.file; import std.string; string mypath = "~/Documents/imgs"; void main() { if(!mypath.exists) {