
Check downloaded ResearchBox files against their checksums
Source:R/archive-researchbox.R
dot-rbox_verify_downloads.RdCompares every unzipped file with the MD5 checksum ResearchBox lists for a file of the same name, and records every listed file that did not arrive or does not match. Files are matched by name, not by folder: the zip puts them in folders by type or by section, and the file list gives both, but the folder names are ResearchBox's own and could change.
Arguments
- rb_url
the box's URL, for the failed table
- out_dir
the folder the box was unzipped into
- listed
the box's file table: from the zip's table of contents, or from the API (
rbox_files()withoutrb_url); NULL when there is none (then nothing can be checked)- file_ids
the ids of the files that were asked for, or
"all". Only these must arrive; every file that does arrive is checked, including a codebook ResearchBox added. An id thatlisteddoes not have (the table of contents lists only the files in the zip) did not arrive.