---
name: "libalpm_files"
section: "3"
platform: "linux"
package: "pacman"
version: "7.1.0.r9.g54d9411-3"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libalpm_files"
---

# libalpm\_files(3)

Files - Functions for package files

## NAME

libalpm\_files - Files

 \- Functions for package files

## SYNOPSIS

### Data Structures

struct **alpm\_file\_t**\
 File in a package.  struct **alpm\_filelist\_t**\
 Package filelist container.  struct **alpm\_backup\_t**\
 Local package or package file backup entry.

### Functions

**alpm\_file\_t** \* **alpm\_filelist\_contains** (const **alpm\_filelist\_t** \*filelist, const char \*path)\
 Determines whether a package filelist contains a given path.

## Detailed Description

Functions for package files

## Data Structure Documentation

## struct alpm\_file\_t

File in a package.

**Data Fields:**

mode\_t *mode* The file's permissions. \

char \* *name* Name of the file. \

off\_t *size* Size of the file. \

## struct alpm\_filelist\_t

Package filelist container.

**Data Fields:**

size\_t *count* Amount of files in the array. \

**alpm\_file\_t** \* *files* An array of files. \

## struct alpm\_backup\_t

Local package or package file backup entry.

**Data Fields:**

char \* *hash* Hash of the filename (used internally). \

char \* *name* Name of the file (without .pacsave extension). \

## Function Documentation

### alpm\_file\_t \* alpm\_filelist\_contains (const alpm\_filelist\_t \* filelist, const char \* path)

Determines whether a package filelist contains a given path. The provided path should be relative to the install root with no leading slashes, e.g. "etc/localtime". When searching for directories, the path must have a trailing slash.

**Parameters**

*filelist* a pointer to a package filelist \
 *path* the path to search for in the package

**Returns**

a pointer to the matching file or NULL if not found

References **alpm\_filelist\_contains()**.

Referenced by **alpm\_filelist\_contains()**.

## Author

Generated automatically by Doxygen for libalpm from the source code.
