zig/lib/std/fs
Pat Tullmann 14c046fc07 lib/std: PermissionDenied/AccessDenied cleanup and fallout
This PR consistently maps .ACCES into AccessDenied and .PERM into
PermissionDenied.  AccessDenied is returned if the file mode bit
(user/group/other rwx bits) disallow access (errno was `EACCES`).
PermissionDenied is returned if something else denies access (errno was
`EPERM`) (immutable bit, SELinux, capabilities, etc).  This somewhat
subtle distinction is a POSIX thing.

Most of the change is updating std.posix Error Sets to contain both
errors, and then propagating the pair up through caller Error Sets.

Fixes #16782
2025-03-24 16:20:45 +01:00
..
AtomicFile.zig extract std.posix from std.os 2024-03-19 11:45:09 -07:00
Dir.zig lib/std: PermissionDenied/AccessDenied cleanup and fallout 2025-03-24 16:20:45 +01:00
File.zig std.fs.File: limit initial_cap according to max_bytes in readToEndAllocOptions 2025-01-30 16:42:15 +01:00
get_app_data_dir.zig std: Add support for SerenityOS in various places 2025-03-11 14:59:42 +00:00
path.zig std: add fs.path.fmtJoin 2025-01-25 04:48:00 +00:00
test.zig lib/std/: WASI code should follow POSIX semantics for AccessDenied/PermissionDenied 2025-03-24 16:20:45 +01:00
wasi.zig Replace deprecated default initializations with decl literals 2024-09-12 16:01:23 +01:00