inSync: inSync

View source: R/inSync.R

inSyncR Documentation

inSync

Description

Checks if all files exist, and whether path 1 (the most derived file) is the same age or newer than path 2- path n (which are used to create path 1)

Usage

inSync(path1, path2, ..., newer = TRUE, full_results = FALSE, WD = "?")

Arguments

path1

path to file of interest (e.g. that is created from the other paths, for newer=T logic)

path2

path to reference file (expected to be at least slightly older, if newer=T). Path 2 can also be

...

path to other reference files to compare modified date to path1; separated by commas

newer

logical; is path1 expected to be newer than (i.e. derived from) other paths? default=T. If newer=F, will test if path1 is older than all other paths.

full_results

default=FALSE; if TRUE, returns a list with success and a data table with modification info

WD

is working directory of the project (useful to supply for shiny app, which has diff. working environment); if "?" supplied, will invoke pick_lesson()

Value

T if timestamps match, F if they don't or if path 1 is missing


galacticpolymath/GPpub documentation built on April 5, 2025, 6:04 p.m.