Thread overview | ||||||
---|---|---|---|---|---|---|
|
September 15, 2017 How to check if path is writable | ||||
---|---|---|---|---|
| ||||
Is there a cross-platform way in D to check if a path is writable? |
September 15, 2017 Re: How to check if path is writable | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joseph | 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.
|
September 15, 2017 Re: How to check if path is writable | ||||
---|---|---|---|---|
| ||||
Posted in reply to Neia Neutuladh | 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:
>> 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.
Um, so I have to do this for every platform? I thought D was a systems language?
|
September 15, 2017 Re: How to check if path is writable | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joseph Attachments:
| 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: >> >>> 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. >> > > Um, so I have to do this for every platform? I thought D was a systems language? > |
Copyright © 1999-2021 by the D Language Foundation