hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

umask.ha (313B)


      1 // License: MPL-2.0
      2 // (c) 2021 Eyal Sawady <ecs@d2evs.net>
      3 // (c) 2021 Umar Getagazov <umar@handlerug.me>
      4 use errors;
      5 use fs;
      6 use rt;
      7 
      8 // Sets the file mode creation mask for the current process and return the
      9 // previous value of the mask.
     10 export fn umask(mode: fs::mode) fs::mode = rt::umask(mode)!: fs::mode;