LR.find_file: Find files by regex pattern.

Description Usage Arguments Value

View source: R/utils.R

Description

Convenience function finding files by regex pattern.

Usage

1
2
LR.find_file(dir = ".", pattern = "", index = "last",
  ignore.case = TRUE, recursive = FALSE)

Arguments

dir

directory or array of directories to search in

pattern

regex matching file name

index

what to return. "last" for last found file, "first" for the first, "all" for all found files; numeric index or array of indexes to subset vector of matching files.

ignore.case

boolean, whether to ignore the case in regex matching

recursive

boolean, whether perform recursive search over sub-directories.

Value

NULL is no match found, otherwise path to found files as prescribed by index settings.


slonik-az/LRutil documentation built on May 7, 2019, 3:17 p.m.