ACCESS(OC)

Shore Programmer's Manual - 2 August 96

NAME

access \- determine read, write, exec access to an object

SYNOPSIS

#include <ShoreApp.h>
shrc Shore::access(const char *path, int mode, int &error);

DESCRIPTION

Access is similar to the Unix system call. It checks the registered object named by path for the permissions indicated by mode.

ARGUMENTS

Path can name any registered object.

Mode must be one of

	R_OK     test for read permission
	W_OK     test for update permission
	X_OK     test for search or execute permission

If the operation is successful but the access indicated by mode is denied, the error code EACCES is returned in error. If an error occurs during the remote operation, error contains a value indicating what the error is. If the operation is successful and the access is permitted, error has the value 0.

Only the access bits are checked.

RESULTS

Only local (object cache) errors can be returned by the function, (e.g., SH_NotInitialized). An error code is returned only if the error occurred before the remote operation was attempted.

BUGS

The mode F_OK is not supported.

VERSION

This manual page applies to Version 1.0 of theShore software.

SPONSORSHIP

The Shore project is sponsored by the Advanced Research Project Agency, ARPA order number 018 (formerly 8230), monitored by the U.S. Army Research Laboratory under contract DAAB07-92-C-Q508.

COPYRIGHT

Copyright (c) 1994, 1995, 1996 Computer Sciences Department, University of Wisconsin -- Madison. All Rights Reserved.

SEE ALSO

errors(oc)