|
ginnOS
The reference: libc, the libraries and the kernel
|
librat: download a file with libcurl. More...
#include "internal.h"#include <errno.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <curl/curl.h>Functions | |
| int | rat_download (const char *url, const char *path, uint64_t max_size, rat_progress_t progress, void *context, rat_error_t *err) |
| download a URL into a file. | |
librat: download a file with libcurl.
only https and file URLs are used (file is for tests and for a repository on a disk). a redirect must go to https too, as GitHub sends the release assets from another host.
| int rat_download | ( | const char * | url, |
| const char * | path, | ||
| uint64_t | max_size, | ||
| rat_progress_t | progress, | ||
| void * | context, | ||
| rat_error_t * | err ) |
download a URL into a file.
only https and file URLs are used, and a redirect must go to https. on a failure the file is removed.
| max_size | the largest file that is accepted. |
| progress | gets the progress (may be NULL). |