this_file_new {campfin}R Documentation

Check if a single file is new

Description

This function tests whether a single file has a modification date equal to the system date. Useful when repeatedly running code with a lengthy download stage. Many state databases are updated daily, so new data can be helpful but not always necessary. Set this function in an if statement.

Usage

this_file_new(path)

Arguments

path

The path to a file to check.

Value

logical; Whether the file has a modification date equal to today.

Examples

tmp <- tempfile()
this_file_new(tmp)

[Package campfin version 1.0.11 Index]