How can I set the umask from within java?

后端 未结 4 977
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-30 13:36

I\'m new to Java. Where is umask exposed in the api?

4条回答
  •  长情又很酷
    2020-11-30 14:21

    Another approach is to use a 3rd-party Java library that exposes POSIX system calls; e.g.

    • Jtux
    • The "Posix for Java" library,
    • and so on (Google for "java posix library").

    The problem with this approach is that it is intrinsically non-portable (won't work on a non-POSIX compliant platform), and requires a platform-specific native library ... and all that that entails.

提交回复
热议问题