Re: Are there any Phobos functions to check file permissions on Windows and Posix?

2015-09-08 Thread Jay Norwood via Digitalmars-d-learn
On Monday, 7 September 2015 at 15:48:56 UTC, BBasile wrote: On Sunday, 6 September 2015 at 23:05:29 UTC, Jonathan M Davis For example you can retieve the flags: archive/readonly/hidden/system/indexable(?) and even if it looks writable or readable, the file won't be open at all because the ACL

Re: Are there any Phobos functions to check file permissions on Windows and Posix?

2015-09-08 Thread Jesse Phillips via Digitalmars-d-learn
On Monday, 7 September 2015 at 15:48:56 UTC, BBasile wrote: On Sunday, 6 September 2015 at 23:05:29 UTC, Jonathan M Davis wrote: [...] which makes treating some of this stuff in a cross-platform fashion quite difficult. And even more with ACLs that it could be: Not to mention, Windows locks

Re: Are there any Phobos functions to check file permissions on Windows and Posix?

2015-09-07 Thread BBasile via Digitalmars-d-learn
On Sunday, 6 September 2015 at 23:05:29 UTC, Jonathan M Davis wrote: [...] which makes treating some of this stuff in a cross-platform fashion quite difficult. And even more with ACLs that it could be: On windows, to know properly if something is readable or writable the attributes are not

Re: Are there any Phobos functions to check file permissions on Windows and Posix?

2015-09-07 Thread FreeSlave via Digitalmars-d-learn
On Sunday, 6 September 2015 at 23:05:29 UTC, Jonathan M Davis wrote: http://dlang.org/phobos/std_file.html#.getAttributes will get you all of the file attributes for a file, though you'll have to look at the Windows and POSIX documentation to know how to interpret that. - Jonathan M Davis

Re: Are there any Phobos functions to check file permissions on Windows and Posix?

2015-09-07 Thread Kagamin via Digitalmars-d-learn
On Sunday, 6 September 2015 at 20:40:04 UTC, Gary Willoughby wrote: Are there any Phobos functions to check file permissions on Windows and Posix? For example, I want to check if a file is readable and/or writable in a cross-platform fashion. Does anyone have an example? Call fopen and check

Re: Are there any Phobos functions to check file permissions on Windows and Posix?

2015-09-06 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, September 06, 2015 20:40:03 Gary Willoughby via Digitalmars-d-learn wrote: > Are there any Phobos functions to check file permissions on > Windows and Posix? For example, I want to check if a file is > readable and/or writable in a cross-platform fashion. Does anyone > have an example?

Are there any Phobos functions to check file permissions on Windows and Posix?

2015-09-06 Thread Gary Willoughby via Digitalmars-d-learn
Are there any Phobos functions to check file permissions on Windows and Posix? For example, I want to check if a file is readable and/or writable in a cross-platform fashion. Does anyone have an example?