Searches for files in dir
using file name regular expression pattern.
util_search_pattern( dir = getwd(), pattern = "^file.*\\.csv$", all.files = FALSE, full.names = TRUE, recursive = FALSE, ignore.case = TRUE, no.. = FALSE )
dir | Character string. Directory to search. |
---|---|
pattern | an optional regular expression. Only file names which match the regular expression will be returned. |
all.files | a logical value. If |
full.names | a logical value. If |
recursive | logical. Should the listing recurse into directories? |
ignore.case | logical. Should pattern-matching be case-insensitive? |
no.. | logical. Should both |
Ivan Jacob Agaloos Pesigan
# Search for files in the working directory # with filenames starting with `file` # and ending with `.csv`. util_search_pattern( dir = getwd(), pattern = "^file.*\\.csv$" )#> character(0)