---
name: "dpm_accessr"
section: "3"
platform: "linux"
package: "libdpm-dev"
version: "1.10.0-2+b3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/dpm_accessr"
---

# dpm\_accessr(3)

check existence/accessibility of a file replica in the pools

## 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

- **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.

## SEE ALSO

**Cns\_accessr(3)**
