XBPS Library API 20240111
The X Binary Package System
Functions
Package URL metadata files handling

Functions

char * xbps_archive_fetch_file (const char *url, const char *fname)
 
int xbps_archive_fetch_file_into_fd (const char *url, const char *fname, int fd)
 
xbps_dictionary_t xbps_archive_fetch_plist (const char *url, const char *p)
 

Detailed Description

Function Documentation

◆ xbps_archive_fetch_file()

char * xbps_archive_fetch_file ( const char *  url,
const char *  fname 
)

Returns a buffer of a file stored in an archive locally or remotely as specified in the url url.

Parameters
[in]urlFull URL to binary package file (local or remote path).
[in]fnameFile name to match.
Returns
A malloc(3)ed buffer with the contents of fname, NULL otherwise and errno is set appropiately.

Definition at line 153 of file plist_fetch.c.

Referenced by xbps_archive_fetch_plist().

Here is the caller graph for this function:

◆ xbps_archive_fetch_file_into_fd()

int xbps_archive_fetch_file_into_fd ( const char *  url,
const char *  fname,
int  fd 
)

Returns a file stored in an archive locally or remotely as specified in the url url and stores it into the file descriptor fd.

Parameters
[in]urlFull URL to binary package file (local or remote path).
[in]fnameFile name to match.
[in]fdAn open file descriptor to put the file into.
Returns
0 on success, an errno value otherwise.

Definition at line 232 of file plist_fetch.c.

◆ xbps_archive_fetch_plist()

xbps_dictionary_t xbps_archive_fetch_plist ( const char *  url,
const char *  p 
)

Internalizes a plist file in an archive stored locally or remotely as specified in the url url.

Parameters
[in]urlFull URL to binary package file (local or remote path).
[in]pProplist file name to internalize as a dictionary.
Returns
An internalized proplib dictionary, otherwise NULL and errno is set appropiately.

Definition at line 284 of file plist_fetch.c.

References xbps_archive_fetch_file().

Here is the call graph for this function: