access multimethod

Methods

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

Parameters

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

Returns

Bool

Example

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