authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-12-22 15:51:04-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-12-23 22:15:12-08:00
log9158d3b2819b9fd3d93922f2522162a0ece53f5a
treee493cc608c44df48d280839616b569fa5abbac75
parentc98157a3c9b0a46bd7af6099e4fbef969bb88223

std: remove ability to override Io.File.Permissions

This is causing another compiler dependency loop. I'll tackle these overrides separately.

2 files changed, 1 insertions(+), 5 deletions(-)

lib/std/Io/File.zig+1-3
...@@ -389,9 +389,7 @@ pub fn setOwner(file: File, io: Io, owner: ?Uid, group: ?Gid) SetOwnerError!void...@@ -389,9 +389,7 @@ pub fn setOwner(file: File, io: Io, owner: ?Uid, group: ?Gid) SetOwnerError!void
389/// Cross-platform representation of permissions on a file.389/// Cross-platform representation of permissions on a file.
390///390///
391/// On POSIX systems this corresponds to "mode" and on Windows this corresponds to "attributes".391/// On POSIX systems this corresponds to "mode" and on Windows this corresponds to "attributes".
392///392pub const Permissions = if (is_windows) enum(std.os.windows.DWORD) {
393/// Overridable via `std.options`.
394pub const Permissions = std.io_options.FilePermissions orelse if (is_windows) enum(std.os.windows.DWORD) {
395 default_file = 0,393 default_file = 0,
396 _,394 _,
397395
lib/std/std.zig-2
...@@ -190,8 +190,6 @@ pub const Options = struct {...@@ -190,8 +190,6 @@ pub const Options = struct {
190};190};
191191
192pub const IoOptions = struct {192pub const IoOptions = struct {
193 /// Overrides `std.Io.File.Permissions`.
194 FilePermissions: ?type = null,
195 debug_threaded_io: ?*Io.Threaded = Io.Threaded.global_single_threaded,193 debug_threaded_io: ?*Io.Threaded = Io.Threaded.global_single_threaded,
196};194};
197195