Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKerrick Staley <mail@kerrickstaley.com>2011-06-18 23:24:05 -0500
committerDan McGee <dan@archlinux.org>2011-06-20 00:18:03 -0500
commit83071f579c4ae14c469d83caa71e80a4be3689df (patch)
tree1b727173cdfbb8ea5b0f6a997aca8602ae5ddabf /lib
parentd980bd403d77933ea2b6636a296f6f905ef992a4 (diff)
Documented _alpm_download()
Documented the _alpm_download() function in dload.c Signed-off-by: Kerrick Staley <mail@kerrickstaley.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/dload.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 93545624..33fb1cb8 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -311,6 +311,16 @@ cleanup:
}
#endif
+/** Download a file given by a URL to a local directory.
+ * Does not overwrite an existing file if the download fails.
+ * @param handle the context handle
+ * @param url the file's URL
+ * @param localpath the directory to save the file in
+ * @param force force download even if there is an up-to-date local copy
+ * @param allow_resume allow a partial download to be resumed
+ * @param errors_ok do not log errors (but still return them)
+ * @return 0 on success, -1 on error (pm_errno is set accordingly if errors_ok == 0)
+ */
int _alpm_download(pmhandle_t *handle, const char *url, const char *localpath,
int force, int allow_resume, int errors_ok)
{