| ... | ... | @@ -48,6 +48,12 @@ pub const File = struct { |
| 48 | 48 | Unknown, |
| 49 | 49 | }; |
| 50 | 50 | |
| 51 | /// This is the default mode given to POSIX operating systems for creating |
| 52 | /// files. `0o666` is "-rw-rw-rw-" which is counter-intuitive at first, |
| 53 | /// since most people would expect "-rw-r--r--", for example, when using |
| 54 | /// the `touch` command, which would correspond to `0o644`. However, POSIX |
| 55 | /// libc implementations use `0o666` inside `fopen` and then rely on the |
| 56 | /// process-scoped "umask" setting to adjust this number for file creation. |
| 51 | 57 | pub const default_mode = switch (builtin.os.tag) { |
| 52 | 58 | .windows => 0, |
| 53 | 59 | .wasi => 0, |