Function setPermissions [src]
Sets permissions according to the provided Permissions struct.
This method is NOT available on WASI
Prototype
pub fn setPermissions(self: Dir, permissions: Permissions) SetPermissionsError!void
Parameters
self: Dir
permissions: Permissions
Possible Errors
The Operating System returned an undocumented error code.
This error is in theory not possible, but it would be better to handle this error than to invoke undefined behavior.
When this error code is observed, it usually means the Zig Standard Library needs a small patch to add the error code to the error set for the respective function.
Source
pub fn setPermissions(self: Dir, permissions: Permissions) SetPermissionsError!void {
const file: File = .{ .handle = self.fd };
try file.setPermissions(permissions);
}