SYNOPSIS
#include <sys/types.h>
#include <unistd.h>
#include "dpm_api.h"
int dpm_accessr (const char *pfn, int amode);
DESCRIPTION
dpm_accessr checks the existence or the accessibility of the file replica according to the dpm. The name server entry for the replica is taken into account and that of the associated pool and, if relevant, the status of an ongoing put request. The physical file name pfn is checked according to the bit pattern in amodeRETURN VALUE
This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, serrno is set appropriately.ERRORS
- ENOENT
- The named file does not exist.
- EACCES
- Search permission is denied on a component of the parent file prefix, the specified access to the file itself is denied or W_OK is requested but the replica status is not 'P' (cannot modify an existing file).
- EFAULT
- pfn is a NULL pointer.
- EINVAL
- amode is invalid.
- ENAMETOOLONG
- The length of pfn exceeds CA_MAXSFNLEN.
- SENOSHOST
- Host unknown.
- SENOSSERV
- Service unknown.
- SECOMERR
- Communication error.
- EDPMNACT
- Disk Pool Manager is not running or is being shutdown.
- ENSNACT
- Name server is not running or is being shutdown.