Functions
fn readOnly(self: Self) bool
Returns
true
if permissions represent an unwritable file.true
is returned …Returns
true
if permissions represent an unwritable file.true
is returned only if no class has write permissions.fn setReadOnly(self: *Self, read_only: bool) void
Sets whether write permissions are provided. This affects all classes. If thi…
Sets whether write permissions are provided. This affects all classes. If this is undesired, use
unixSet
This method DOES NOT set permissions on the filesystem: useFile.setPermissions(permissions)
fn unixHas(self: Self, class: Class, permission: Permission) bool
Returns
true
if the chosen class has the selected permission. This method is …Returns
true
if the chosen class has the selected permission. This method is only available on Unix platforms.fn unixNew(new_mode: Mode) Self
Returns a
Permissions
struct representing the permissions from the passed mode…Returns a
Permissions
struct representing the permissions from the passed mode.fn unixSet(self: *Self, class: Class, permissions: struct { read: ?bool = null, write: ?bool = null, execute: ?bool = null, }) void
Sets the permissions for the chosen class. Any permissions set to
null
are lef…Sets the permissions for the chosen class. Any permissions set to
null
are left unchanged. This method DOES NOT set permissions on the filesystem: useFile.setPermissions(permissions)