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

# rfio\_rcp(3)

third party copy of a file

## NAME

rfio\_rcp - third party copy of a file

## SYNOPSIS

**#include \<sys/types.h\>**\
 **#include "rfio\_api.h"**

**int rfio\_rcp (char \****source***, char \****destination***, int** *timeout***);**

## DESCRIPTION

**rfio\_rcp** triggers a third party copy of a file.

- *source*

  specifies the physical path of the source file.

- *destination*

  specifies the physical path of the file at destination.

- *timeout*

  specifies the time after which the copy is cancelled if not completed.

## 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 source file does not exist or a component of *destination* prefix does not exist.

- **EACCES**

  Search permission is denied on a component of the *source* or *destination* prefix or read permission is not granted on the source file or write permission on the destination parent directory is denied.

- **EFAULT**

  *source* or *destination* is a NULL pointer.

- **ENOSPC**

  No space to store the new file copy.

- **ENAMETOOLONG**

  The length of *source* or *destination* exceeds **CA\_MAXPATHLEN** or the length of a path component exceeds **CA\_MAXNAMELEN**.

- **SENOSHOST**

  Host unknown.

- **SETIMEDOUT**

  Has timed out.

- **SECOMERR**

  Communication error.

## SEE ALSO

**[Castor\_limits(4)](/Castor_limits/4.md)**
