Download files from urls with curl
-
xfile
Constructs an XFILE target from the source.
Actual type of result can change and be determined by the type of the file itself. -
alias
Pass through source(s) as the target(s) associated the the main target name.
This can be useful with curl URLs for when xfile doesn't work due to generator ambiguity.
-
<xurl> url
Alternative method for specifying a URL source. -
<xcurl-arg> option
curl tool receives option arguments when executed on XCURL_URL source
If not set, location redirection (-L) is enabled.
Consult curl manpage for valid options -
<xcurl-retry> N
Number of times to invoke curl to try and fetch the remote file.
Default: 3
This is not the same as the --retry argument. -
<xcurl-output-name> name
Target filename.
Defaults to mangled form of source URL.
Result type is deduced from output name. -
<xcurl-file-type> type
Explicitly set the result type.
- <xworkspace> and related features
By default, the workspace for a XCURL_FILE target is invariant.
It has an implicit<xinvariant>.*
property.
- workspace/output-name.curl-log
Type | Base Type | Infer from source | Generate from |
---|---|---|---|
XCURL_URL | XURL | Valid URL | |
XCURL_FILE | XFILE | XCURL_URL |
Example URL | Note |
---|---|
http://host/path/file | local http host |
http://host.tld/path/file | fully qualified domain http url |
http://host.tld/path/file?arg&arg2=value&arg3=value | url arguments also valid |
https://host.tld/path/file | https support |
ftp://ftp.domain.tld/path/file | ftp support |
file:///absolute/path/to/file | local file url |