13 * Supported URL types.
15 typedef enum urltype_e {
16 URL_IS_UNKNOWN = 0, /*!< unknown (aka a file) */
17 URL_IS_DASH = 1, /*!< stdin/stdout */
18 URL_IS_PATH = 2, /*!< file://... */
19 URL_IS_FTP = 3, /*!< ftp://... */
20 URL_IS_HTTP = 4, /*!< http://... */
21 URL_IS_HTTPS = 5, /*!< https://... */
22 URL_IS_HKP = 6 /*!< hkp://... */
27 * @param url url string
30 urltype urlIsURL(const char * url);
33 * Return path component of URL.
34 * @param url url string
35 * @retval pathp pointer to path component of url
38 urltype urlPath(const char * url, const char ** pathp);
41 * Copy data from URL to local file.
42 * @param url url string of source
43 * @param dest file name of destination
44 * @return 0 on success, -1 on error
46 int urlGetFile(const char * url, const char * dest);