fetchTimestamp: Update timestamp file if needed

Description Usage Arguments Value

View source: R/fetchTimestamp.R

Description

fetchTimestamp updates a timestamp file if the local copy of a file is out of date relative to the data source. In practice, the desired definition of 'out of date' differs widely among data sources, sizes, and projects, so fetchTimestamp is a generic function with a method specific to each fetcher. Every fetchTimestamp method should write a timestamp file, or not, as required to achieve the desired make behavior. See fetchTimestampMethods and fetchTimestampHelpers for assistance in defining new fetchTimestamp methods. Also consider preferences.yaml and exceededTimeToLive() for additional options for managing data fetches.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
fetchTimestamp(viz)

## S3 method for class 'sciencebase'
fetchTimestamp(viz)

## S3 method for class 'file'
fetchTimestamp(viz)

## S3 method for class 'url'
fetchTimestamp(viz)

## S3 method for class 'fetcher'
fetchTimestamp(viz)

Arguments

viz

the identifier for a fetch item in viz.yaml

Value

It doesn't matter what a fetchTimestamp method returns. It matters a lot more whether it creates/updates the timestamp file or not.


USGS-VIZLAB/vizlab documentation built on July 10, 2019, 12:08 a.m.