powered by
Given a file or folder path (or vector), returns a data.frame containing file name, size (MB), last modified time, optional line count, and path.
file_info( paths, recursive = FALSE, count_line = TRUE, preview = TRUE, filter_pattern = NULL, full_name = TRUE )
A data.frame with columns: file, size_MB, modified_time, line_count, path.
Character vector of file paths or a folder path.
Logical. If a folder is given, whether to search recursively. Default: FALSE.
Logical. Whether to count lines in each file. Default: TRUE.
Logical. Whether to show skipped/missing messages. Default: TRUE.
Optional regex to filter file names (e.g., "\.R$"). Default: NULL.
Logical. Whether to return full file paths. Default: TRUE.
file_info("R") file_info(c("README.md", "DESCRIPTION")) file_info("R", filter_pattern = "\\.R$", recursive = TRUE)
Run the code above in your browser using DataLab