Skip to contents

Lists all boilerplate database files in a directory, organised by type (standard, timestamped, or backup).

Usage

boilerplate_list_files(data_path = NULL, pattern = NULL, category = NULL)

Arguments

data_path

Character. Path to the directory containing database files. If NULL (default), uses here::here("boilerplate", "data").

pattern

Character. Optional regex pattern to filter files.

category

Character. Optional category to filter results. Options include "measures", "methods", "results", "discussion", "appendix", "template", or "unified".

Value

A list with class "boilerplate_files" containing:

standard

Data frame of standard database files

timestamped

Data frame of timestamped versions

backups

Data frame of backup files

other

Data frame of other files that match the pattern

Each data frame contains columns: file, path, size, modified, format, base_name, timestamp, type, and category.

See also

boilerplate_import for importing the listed files, boilerplate_restore_backup for restoring from backups.

Examples

if (FALSE) { # \dontrun{
# List all database files
files <- boilerplate_list_files()
print(files)

# List only methods files
files <- boilerplate_list_files(category = "methods")

# List files matching a pattern
files <- boilerplate_list_files(pattern = "2024")
} # }