accessSync

abstract fun accessSync(path: Value)

Method: fs.accessSync

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 and operates synchronously, raising an exception for failures.

Parameters

path

The path to the file to test access for.


abstract fun accessSync(path: Value, mode: 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 and operates synchronously, raising an exception for failures.

Parameters

path

The path to the file to test access for.

mode

The mode to test for access.


abstract fun accessSync(path: Path, mode: AccessMode = AccessMode.READ)

Method: fs.accessSync

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 that operates synchronously.

Parameters

path

The path to the file to read.

mode

The mode to test for access.