XBPS Library API 20240111
The X Binary Package System
Functions
Archive_util

Functions

int xbps_archive_append_buf (struct archive *ar, const void *buf, const size_t buflen, const char *fname, const mode_t mode, const char *uname, const char *gname)
 

Detailed Description

Function Documentation

◆ xbps_archive_append_buf()

int xbps_archive_append_buf ( struct archive *  ar,
const void *  buf,
const size_t  buflen,
const char *  fname,
const mode_t  mode,
const char *  uname,
const char *  gname 
)

Appends a file to the ar archive by using a memory buffer buf of size sizelen.

Parameters
[in]arThe archive object.
[in]bufThe memory buffer to be used as file data.
[in]buflenThe size of the memory buffer.
[in]fnameThe filename to be used for the entry.
[in]modeThe mode to be used in the entry.
[in]unameThe user name to be used in the entry.
[in]gnameThe group name to be used in the entry.
Returns
0 on success, or any negative or errno value otherwise.

Definition at line 77 of file archive.c.