Function setReadOnly [src]

Sets whether write permissions are provided. This method DOES NOT set permissions on the filesystem: use File.setPermissions(permissions)

Prototype

pub fn setReadOnly(self: *Self, read_only: bool) void

Parameters

self: *Selfread_only: bool

Source

pub fn setReadOnly(self: *Self, read_only: bool) void { if (read_only) { self.attributes |= windows.FILE_ATTRIBUTE_READONLY; } else { self.attributes &= ~@as(windows.DWORD, windows.FILE_ATTRIBUTE_READONLY); } }