Type AT [src]

Members

Source

pub const AT = switch (native_os) { .linux => linux.AT, .windows => struct { /// Remove directory instead of unlinking file pub const REMOVEDIR = 0x200; }, .macos, .ios, .tvos, .watchos, .visionos => struct { pub const FDCWD = -2; /// Use effective ids in access check pub const EACCESS = 0x0010; /// Act on the symlink itself not the target pub const SYMLINK_NOFOLLOW = 0x0020; /// Act on target of symlink pub const SYMLINK_FOLLOW = 0x0040; /// Path refers to directory pub const REMOVEDIR = 0x0080; }, .freebsd => struct { /// Magic value that specify the use of the current working directory /// to determine the target of relative file paths in the openat() and /// similar syscalls. pub const FDCWD = -100; /// Check access using effective user and group ID pub const EACCESS = 0x0100; /// Do not follow symbolic links pub const SYMLINK_NOFOLLOW = 0x0200; /// Follow symbolic link pub const SYMLINK_FOLLOW = 0x0400; /// Remove directory instead of file pub const REMOVEDIR = 0x0800; /// Fail if not under dirfd pub const BENEATH = 0x1000; }, .netbsd => struct { /// Magic value that specify the use of the current working directory /// to determine the target of relative file paths in the openat() and /// similar syscalls. pub const FDCWD = -100; /// Check access using effective user and group ID pub const EACCESS = 0x0100; /// Do not follow symbolic links pub const SYMLINK_NOFOLLOW = 0x0200; /// Follow symbolic link pub const SYMLINK_FOLLOW = 0x0400; /// Remove directory instead of file pub const REMOVEDIR = 0x0800; }, .dragonfly => struct { pub const FDCWD = -328243; pub const SYMLINK_NOFOLLOW = 1; pub const REMOVEDIR = 2; pub const EACCESS = 4; pub const SYMLINK_FOLLOW = 8; }, .openbsd => struct { /// Magic value that specify the use of the current working directory /// to determine the target of relative file paths in the openat() and /// similar syscalls. pub const FDCWD = -100; /// Check access using effective user and group ID pub const EACCESS = 0x01; /// Do not follow symbolic links pub const SYMLINK_NOFOLLOW = 0x02; /// Follow symbolic link pub const SYMLINK_FOLLOW = 0x04; /// Remove directory instead of file pub const REMOVEDIR = 0x08; }, .haiku => struct { pub const FDCWD = -1; pub const SYMLINK_NOFOLLOW = 0x01; pub const SYMLINK_FOLLOW = 0x02; pub const REMOVEDIR = 0x04; pub const EACCESS = 0x08; }, .solaris, .illumos => struct { /// Magic value that specify the use of the current working directory /// to determine the target of relative file paths in the openat() and /// similar syscalls. pub const FDCWD: fd_t = @bitCast(@as(u32, 0xffd19553)); /// Do not follow symbolic links pub const SYMLINK_NOFOLLOW = 0x1000; /// Follow symbolic link pub const SYMLINK_FOLLOW = 0x2000; /// Remove directory instead of file pub const REMOVEDIR = 0x1; pub const TRIGGER = 0x2; /// Check access using effective user and group ID pub const EACCESS = 0x4; }, .emscripten => struct { pub const FDCWD = -100; pub const SYMLINK_NOFOLLOW = 0x100; pub const REMOVEDIR = 0x200; pub const SYMLINK_FOLLOW = 0x400; pub const NO_AUTOMOUNT = 0x800; pub const EMPTY_PATH = 0x1000; pub const STATX_SYNC_TYPE = 0x6000; pub const STATX_SYNC_AS_STAT = 0x0000; pub const STATX_FORCE_SYNC = 0x2000; pub const STATX_DONT_SYNC = 0x4000; pub const RECURSIVE = 0x8000; }, .wasi => struct { // Match `AT_*` constants in lib/libc/include/wasm-wasi-musl/__header_fcntl.h pub const EACCESS = 0x0; pub const SYMLINK_NOFOLLOW = 0x1; pub const SYMLINK_FOLLOW = 0x2; pub const REMOVEDIR = 0x4; /// When linking libc, we follow their convention and use -2 for current working directory. /// However, without libc, Zig does a different convention: it assumes the /// current working directory is the first preopen. This behavior can be /// overridden with a public function called `wasi_cwd` in the root source /// file. pub const FDCWD: fd_t = if (builtin.link_libc) -2 else 3; }, // https://github.com/SerenityOS/serenity/blob/2808b0376406a40e31293bb3bcb9170374e90506/Kernel/API/POSIX/fcntl.h#L49-L52 .serenity => struct { pub const FDCWD = -100; pub const SYMLINK_NOFOLLOW = 0x100; pub const REMOVEDIR = 0x200; pub const EACCESS = 0x400; }, else => void, }