this_file_new: Check if a single file is new

View source: R/files-new.R

this_file_newR 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)

campfin documentation built on Oct. 20, 2023, 5:06 p.m.