access multimethod

Methods

access(f:File, mode:Int=0) Source: stdlib.ngs:6478
Check whether current process has the specified access to the file. Wrapper around ACCESS(2). Throws CException.

Parameters

modeOne of the file ACCESS::* modes, defaults to ACCESS::F_OK (test file existance only).

Returns

Bool

Example

access(File("mydata"), ACCESS::R_OK).not() throws Error("No access to data file").set("file", "mydata")