What is the rationale behind std.file.setAttributes ?
Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Sat Dec 28 14:42:21 PST 2013
As much as I dislike PHP, I think they are onto something with
having an optional stream context object that you can pass onto
various file functions. It allows you to treat HTTP and the
regular file system in the same manner (by having authentication
etc in the context object).
Rather than setting attributes you would populate the context
object (you could use a OS-specific factory function/class) with
the settings you want and then pass it around. I guess you could
then precreate one context for ReadOnly, another for
ExecutableBinary, another for MIME text/html etc…
More information about the Digitalmars-d
mailing list