archive_selected_items.RdCreates a ZIP archive containing selected files at specific commit versions. Handles file staging, directory structure options, and archive creation with proper error handling and user notifications.
archive_selected_items(
input,
session,
archive_name,
root_dir,
flatten = FALSE,
archive_items = character(0),
commit_df = NULL
)Reactive input object from Shiny session containing user selections.
Shiny session object for accessing namespaced inputs and notifications.
Character string. The desired name/path for the archive file.
Character string. The root directory path to use as the base for relative archive paths and working directory operations.
Logical. If TRUE, removes directory structure and places all files in the root of the archive. Default is FALSE.
Character vector. File paths to be included in the archive. Default is empty character vector.
Data frame containing commit information with columns: commit, file, and approved status. Used for generating archive metadata. Default is NULL.
Character string (invisible). The absolute path to the created ZIP file, or NULL if no files were archived.