| ... | @@ -32,11 +32,7 @@ pub const Kind = Io.File.Kind; | ... | @@ -32,11 +32,7 @@ pub const Kind = Io.File.Kind; |
| 32 | /// the `touch` command, which would correspond to `0o644`. However, POSIX | 32 | /// the `touch` command, which would correspond to `0o644`. However, POSIX |
| 33 | /// libc implementations use `0o666` inside `fopen` and then rely on the | 33 | /// libc implementations use `0o666` inside `fopen` and then rely on the |
| 34 | /// process-scoped "umask" setting to adjust this number for file creation. | 34 | /// process-scoped "umask" setting to adjust this number for file creation. |
| 35 | pub const default_mode = switch (builtin.os.tag) { | 35 | pub const default_mode: Mode = if (Mode == u0) 0 else 0o666; |
| 36 | .windows => 0, | | |
| 37 | .wasi => 0, | | |
| 38 | else => 0o666, | | |
| 39 | }; | | |
| 40 | | 36 | |
| 41 | /// Deprecated in favor of `Io.File.OpenError`. | 37 | /// Deprecated in favor of `Io.File.OpenError`. |
| 42 | pub const OpenError = Io.File.OpenError || error{WouldBlock}; | 38 | pub const OpenError = Io.File.OpenError || error{WouldBlock}; |