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

setPermissions

Public Function
std.Io.Dir.setPermissions
pub fn setPermissions(dir: Dir, io: Io, new_permissions: File.Permissions) SetPermissionsError!void

Also known as "chmod".

The process must have the correct privileges in order to do this successfully, or must have the effective user ID matching the owner of the directory. Additionally, the directory must have been opened with OpenOptions.iterate set to true.

Params

  • dir: Dir
  • io: Io
  • new_permissions: File.Permissions

File

Io/Dir.zig:1946
1946
1947
1948
pub fn setPermissions(dir: Dir, io: Io, new_permissions: File.Permissions) SetPermissionsError!void {
    return io.vtable.dirSetPermissions(io.userdata, dir, new_permissions);
}