Mono Class Library: Mono.Posix.Syscall Overview | Members

Mono.Posix.Syscall.access Method

Checks whether the calling task has the necessary access rights to perform operations specified by mode on the file pathname. AccessMode is a mask consisting of one or more of the values R_OK, W_OK, X_OK and F_OK which respectively test if the taks can read, write, execute or test if the file exists. [Edit]

public static int access (string pathname, AccessMode mode)

See Also

Mono.Unix.Native.Syscall.access

Parameters

pathname
a string [Edit]
mode
a int [Edit]

Returns

a int. On success, zero is returned. On error, -1 is returned and System.Runtime.InteropServices.Marshal.GetLastWin32Error is set. [Edit]

Remarks

This member is obsolete. Please use Mono.Unix.Native.Syscall.access instead.

The test is performed using the real uid and gid of the calling task. Only the access bits of the file are tested. See 'man access(2)' for more information and error codes.

[Edit]

Requirements

Namespace: Mono.Posix
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0