Scroll to navigation

DPM_ACCESSR(3) DPM Library Functions DPM_ACCESSR(3)

NAME

dpm_accessr - check existence/accessibility of a file replica in the pools

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 amode

RETURN 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

The named file does not exist.
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).
pfn is a NULL pointer.
amode is invalid.
The length of pfn exceeds CA_MAXSFNLEN.
Host unknown.
Service unknown.
Communication error.
Disk Pool Manager is not running or is being shutdown.
Name server is not running or is being shutdown.

SEE ALSO

Cns_accessr(3)

$Date: 2013/06/12 14:00:00 $ WLCG