Julia: Support for umask

Created on 21 Oct 2017  Â·  3Comments  Â·  Source: JuliaLang/julia

It would be good to provide an interface to the POSIX umask function. Also, it would be handy if we could provide an umasked-chmod function.

filesystem

Most helpful comment

I have to say that I have always hated the octal form of this API. If we support this, I hope we can include something like chmod's symbolic syntax, e.g. umask(u="rw",g="r",o=""). (We can support the octal/numeric codes too, I would just hate for this to be the only API.)

All 3 comments

I have to say that I have always hated the octal form of this API. If we support this, I hope we can include something like chmod's symbolic syntax, e.g. umask(u="rw",g="r",o=""). (We can support the octal/numeric codes too, I would just hate for this to be the only API.)

Agree – I like the proposal for the API, although I guess I would spell out the keywords:

umask(user="rw", group="r", o="")

The same kind of API should probably apply to chmod and there we could potentially support a UNIX-like "+rw" kind of scheme as well as recursion.

Note: Windows has _umask_s, the "Security-Enhancedâ„¢" version.

Was this page helpful?
0 / 5 - 0 ratings