Learn R Programming

contentid (version 0.0.15)

store: Store files in a local cache

Description

Resources at a specified URL will be downloaded and copied into the local content-based storage. Local paths will simply be copied into local storage. Identical content is not duplicated.

Usage

store(x, dir = content_dir(), algos = default_algos())

Arguments

x

a URL, connection, or file path.

dir

the path we should use for permanent / on-disk storage of the registry. An appropriate default will be selected (also configurable using the environmental variable CONTENTID_HOME), if not specified.

algos

Which algorithms should we compute contentid for? Default "sha256", see details.

Value

the content-based identifier

See Also

retrieve

Examples

Run this code
# NOT RUN {
# Store & retrieve local file
vostok_co2 <- system.file("extdata", "vostok.icecore.co2",
                          package = "contentid")
 id <- store(vostok_co2)
 retrieve(id)

# }

Run the code above in your browser using DataLab