XBPS Library API  0.19
The X Binary Package System
Functions
Download functions

Functions

const char * xbps_fetch_error_string (void)
 
int xbps_fetch_file (struct xbps_handle *xhp, const char *uri, const char *flags)
 

Detailed Description

XBPS download related functions, frontend for NetBSD's libfetch.

Function Documentation

const char* xbps_fetch_error_string ( void  )

Returns last error string reported by xbps_fetch_file().

Returns
A string with the appropiate error message.

Definition at line 82 of file download.c.

Referenced by xbps_rpool_sync().

+ Here is the caller graph for this function:

int xbps_fetch_file ( struct xbps_handle xhp,
const char *  uri,
const char *  flags 
)

Download a file from a remote URL to current working directory.

Parameters
[in]xhpPointer to an xbps_handle struct.
[in]uriRemote URI string.
[in]flagsFlags passed to libfetch's fetchXget().
Returns
-1 on error, 0 if not downloaded (because local/remote size/mtime do not match) and 1 if downloaded successfully.

Definition at line 91 of file download.c.

References xbps_handle::fetch_timeout, and xbps_xasprintf().

+ Here is the call graph for this function: