Skip to contents

Mirrors .zenodo_verify_downloads()/.dataverse_verify_downloads(): confirms every file the download planned to save is present, is the size Figshare reported, and (when Figshare published a computed_md5) matches the checksum.

Usage

.figshare_verify_downloads(files, download_to)

Arguments

files

the file table being built, with path, size, checksum, and downloaded columns, and optionally extracted

download_to

the folder the article was saved in

Value

files with downloaded corrected against the file system, plus size_on_disk and checksum_ok columns

Details

A row whose extracted count is set is exempt from both checks, for the same reason as the Zenodo/Dataverse case: Figshare's size and checksum describe the zip as published, and that zip was deliberately never downloaded – only chosen members were, each verified against the CRC32 in the archive's own central directory as it is extracted.