Expand description
decdn get <URI> (#2449): pull what a decdn: URI names
(adr/appendix-bundles.md § decdn: URIs).
The command parses the URI with decdn_client::uri::DecdnUri, checks the
flags against the URI’s target, and runs the route for that target:
decdn:<hash>runs the blob fetch,fetch::fetch.decdn:<hash>/runs the bundle pull,bundle_pull::bundle_pull, over every entry.decdn:<hash>/<path>runs the bundle pull for exactly that entry. With-o -it runs the blob fetch instead, which reads the manifest and streams that entry’s blob to stdout.
The URI’s ns is the namespace hint of either route.
Without -o, the destination follows the target: ./<hash> for a blob,
. for a bundle, and ./<name> for an entry, where <name> is the last
segment of the entry’s path. The command then writes the absolute
destination to stderr before the pull starts, except under --json or
--dry-run. A bundle or entry pull into a default destination refuses a
path that holds a file no earlier pull of the same entry left there
unchanged, unless --overwrite.
A default destination, like any relative -o, resolves against the
current directory, and so does the run’s resume state. A run that stops on
Ctrl-C or a give-up names that directory as the one to run the command again
from.
Functions§
- get
- Run
decdn get: parse the URI and run the route its target names.