digitalmars.D.learn - How to check if path is writable
- Joseph (1/1) Sep 14 2017 Is there a cross-platform way in D to check if a path is writable?
- Neia Neutuladh (2/4) Sep 14 2017 Try to write to it and see if you get an error.
- Joseph (4/8) Sep 14 2017 Um, so I have to do this for every platform? I thought D was a
- Daniel Kozak via Digitalmars-d-learn (4/14) Sep 14 2017 You can use https://dlang.org/phobos/std_file.html#getAttributes, but yo...
Is there a cross-platform way in D to check if a path is writable?
Sep 14 2017
On Friday, 15 September 2017 at 01:42:02 UTC, Joseph wrote:Is there a cross-platform way in D to check if a path is writable?Try to write to it and see if you get an error.
Sep 14 2017
On Friday, 15 September 2017 at 02:02:54 UTC, Neia Neutuladh wrote:On Friday, 15 September 2017 at 01:42:02 UTC, Joseph wrote:Um, so I have to do this for every platform? I thought D was a systems language?Is there a cross-platform way in D to check if a path is writable?Try to write to it and see if you get an error.
Sep 14 2017
You can use https://dlang.org/phobos/std_file.html#getAttributes, but you still need to distinguish Windows and posix platforms On Fri, Sep 15, 2017 at 5:36 AM, Joseph via Digitalmars-d-learn < digitalmars-d-learn puremagic.com> wrote:On Friday, 15 September 2017 at 02:02:54 UTC, Neia Neutuladh wrote:On Friday, 15 September 2017 at 01:42:02 UTC, Joseph wrote:Um, so I have to do this for every platform? I thought D was a systems language?Is there a cross-platform way in D to check if a path is writable?Try to write to it and see if you get an error.
Sep 14 2017