camr_find_file: Find Path to Most Recent File

View source: R/R02-Files_and_paths.R

camr_find_fileR Documentation

Find Path to Most Recent File

Description

Function to find the absolute path to the most up-to-date version of a file given a partial match to its name and the file location.

Usage

camr_find_file(
  nm_desc,
  chr_path,
  chr_project = NULL,
  chr_date = NULL,
  chr_commit = NULL,
  chr_date_tolerance = "s",
  lgl_recurse = TRUE
)

Arguments

nm_desc

A character string, the file name or part of the file name that can uniquely identify it from other files.

chr_path

A character string, the name of the file path to search in.

chr_project

An optional character string, the name of the project.

chr_date

An optional character string, the date of the file.

chr_commit

An optional character string, the commit number of the file.

chr_date_tolerance

An optional character string, margin of error for the date of the file ('s', 'm', 'h', 'd').

lgl_recurse

Logical; if TRUE, the function will recurse fully.

Value

A character string, an absolute path to a file.

Author(s)

Michael Pascale


rettopnivek/camrprojects documentation built on March 26, 2024, 9:17 a.m.