View source: R/01-file_index.R
file_index_search | R Documentation |
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
)
index |
The index (tibble) of a folder with file locations and metadata, either previously generated by file_index_create() or created from folder. |
file_path |
A character string specifying a file path to search by. Can be the full string or substring (matching by regex is supported) |
file_name |
A character string a file name to search by. Can be the full string or substring (matching by regex is supported). |
extension |
A character string a file extension to search by. Can be the full string or substring (matching by regex is supported). |
file_type |
A character string a file type to search by. Can be the full string or substring (matching by regex is supported). |
show_tree |
If TRUE, return the file tree of the query. |
The function displays the tree of your files. You can enable this functionality with 'show_tree = TRUE'
A tibble with indexed information for files matching the query.
## Not run:
index <- file_index_create(tempdir())
file_index_search(index, file_name = my_file_name)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.