On Wed, 28 Aug 2013 00:51:12 +0200, Ramon wrote: > > - trying with filename r"~/text.txt" (i.e. an existing file in my home > dir) it FAILED. > > - trying with the same filename but this time home dir explicitely > written out fully (r"/home/me/test.txt) it WORKED. > > Conclusion: I assume D's OS path related mechanisms to be somewhat dumb. > Anyway the code throws where it's supposed to, i.e. when confronted with > a non existing (or not recognized?) path.
You need to use the expandTilde function: http://dlang.org/phobos/ std_path.html#.expandTilde