---
name: "dpm_extendfilelife"
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_extendfilelife"
---

# dpm\_extendfilelife(3)

extend file lifetime

## NAME

dpm\_extendfilelife - extend file lifetime

## SYNOPSIS

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

**int dpm\_extendfilelife (char \****r\_token***,** **char \****surl***,** **time\_t** *lifetime***,** **time\_t \****actual\_lifetime***)**

## DESCRIPTION

**dpm\_extendfilelife** extends file lifetime.

- *r\_token*

  specifies the token returned by a previous get, put or copy request.

- *surl*

  specifies the name of the file.

- *lifetime*

  specifies the new lifetime relative to the current time.

- *actual\_lifetime*

  will receive the actual lifetime assigned by the server.

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

  File does not exist.

- **EFAULT**

  *surl* is a NULL pointer.

- **EINVAL**

  The length of *r\_token* exceeds **CA\_MAXDPMTOKENLEN** or the token is unknown.

- **ENAMETOOLONG**

  The length of the surl exceeds **CA\_MAXSFNLEN**.

- **SENOSHOST**

  Host unknown.

- **SEINTERNAL**

  Database error.

- **SECOMERR**

  Communication error.
