libalpm
Arch Linux Package Manager Library

Functions for package files More...

Collaboration diagram for Files:

Data Structures

struct  alpm_file_t
 File in a package. More...
 
struct  alpm_filelist_t
 Package filelist container. More...
 
struct  alpm_backup_t
 Local package or package file backup entry. More...
 

Functions

alpm_file_talpm_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

◆ alpm_file_t

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.

◆ alpm_filelist_t

struct alpm_filelist_t

Package filelist container.

Collaboration diagram for alpm_filelist_t:
Data Fields
size_t count Amount of files in the array.
alpm_file_t * files An array of files.

◆ alpm_backup_t

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_filelist_contains()

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
filelista pointer to a package filelist
paththe path to search for in the package
Returns
a pointer to the matching file or NULL if not found

References alpm_filelist_t::count, alpm_filelist_t::files, and alpm_file_t::name.

Referenced by alpm_db_find_file_owners(), dir_belongsto_pkgs(), extract_single_file(), should_skip_file(), and unlink_file().