---
name: "sc_update_dir"
section: "3"
platform: "linux"
package: "libopensc2-dev"
version: "0.11.13-1.1"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/sc_update_dir"
---

# sc\_update\_dir(3)

Update application directory on a card

## NAME

sc\_update\_dir - Update application directory on a card

## SYNOPSIS

```
#include <opensc.h>
int sc_update_dir(sc_card_t *card, sc_app_info_t *app);
```

## DESCRIPTION

This function updates the application directory on *card*. If the card has a record-structured directory file, *app* may contain the application to update. Otherwise, the entire directory file is updated.

Before calling this function, you MUST call sc\_enum\_apps() first.

## RETURN VALUE

Returns 0 if successful, or a negative value in case of error.
