What is the rationale behind std.file.setAttributes ?

Jacob Carlborg doob at me.com
Sun Dec 29 04:44:02 PST 2013


On 2013-12-29 11:36, Marco Leise wrote:

> Oh right, they have a hidden attribute as well. I guess if
> Phobos should expose the 'hidden' state of a file it should
> write to this attribute, but read both. E.g. for a file
> named ".hidden" you could do:
>
>    attribs.hidden = false;
>
> and still
>
>    assert(attribs.hidden == true);
>
> due to the POSIX file naming taking precedence then.

Yeah, but that seems quite confusing. I don't know if it would be wise 
to use the same function for that. It would probably also be confusing 
if "attribs.hidden = false" renamed the file to remove the leading dot, 
if present.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list