Searches in file index R object (tibble) based on pattern and other query options and provides a table where all the files in a specified folder and corresponding to the query are listed (recursively). If no index tibble is provided, the function creates one from the working directory.
file_index_search(
index,
file_path = "^",
file_name = "^",
extension = "^",
file_type = "^",
show_tree = FALSE
)
The index (tibble) of a folder with file locations and metadata, either previously generated by file_index_create() or created from folder.
A character string specifying a file path to search by. Can be the full string or substring (matching by regex is supported)
A character string a file name to search by. Can be the full string or substring (matching by regex is supported).
A character string a file extension to search by. Can be the full string or substring (matching by regex is supported).
A character string a file type to search by. Can be the full string or substring (matching by regex is supported).
If TRUE, return the file tree of the query.
A tibble with indexed information for files matching the query.
The function displays the tree of your files. You can enable this functionality with 'show_tree = TRUE'
if (FALSE) {
index <- file_index_create(tempdir())
file_index_search(index, file_name = my_file_name)
}