mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
add doc comments to std.fs.File.default_mode
This commit is contained in:
parent
4789cc0249
commit
426c13dddf
@ -48,6 +48,12 @@ pub const File = struct {
|
||||
Unknown,
|
||||
};
|
||||
|
||||
/// This is the default mode given to POSIX operating systems for creating
|
||||
/// files. `0o666` is "-rw-rw-rw-" which is counter-intuitive at first,
|
||||
/// since most people would expect "-rw-r--r--", for example, when using
|
||||
/// the `touch` command, which would correspond to `0o644`. However, POSIX
|
||||
/// libc implementations use `0o666` inside `fopen` and then rely on the
|
||||
/// process-scoped "umask" setting to adjust this number for file creation.
|
||||
pub const default_mode = switch (builtin.os.tag) {
|
||||
.windows => 0,
|
||||
.wasi => 0,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user