Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Function

open

Public Function
std.os.linux.open
pub fn open(path: [*:0]const u8, flags: O, perm: mode_t) usize

Params

  • path: [*:0]const u8
  • flags: O
  • perm: mode_t

File

os/linux.zig:1707
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
pub fn open(path: [*:0]const u8, flags: O, perm: mode_t) usize {
    if (@hasField(SYS, "open")) {
        return syscall3(.open, @intFromPtr(path), @as(u32, @bitCast(flags)), perm);
    } else {
        return syscall4(
            .openat,
            @as(u32, @bitCast(@as(i32, AT.FDCWD))),
            @intFromPtr(path),
            @as(u32, @bitCast(flags)),
            perm,
        );
    }
}