access

abstract fun access(path: Value, callback: Value)

Method: fs.access

Tests a user's permissions for the file at the specified path; provides the results or an error to the callback. This variant specifies the default mode of F_OK.

Parameters

path

The path to the file to test access for.

callback

The callback to provide the results or an error.


abstract fun access(path: Value, mode: Value, callback: Value)

Method: fs.access

Tests a user's permissions for the file at the specified path; provides the results or an error to the callback. This variant accepts a mode.

Parameters

path

The path to the file to test access for.

mode

The mode to test for access.

callback

The callback to provide the results or an error.


abstract fun access(path: Path, mode: AccessMode = AccessMode.READ, callback: AccessCallback)

Method: fs.access

Tests a user's permissions for the file at the specified path; provides the results or an error to the callback. This is a host-side variant.

Parameters

path

The path to the file to read.

mode

The mode to test for access.

callback

The callback to provide the results or an error.