Fetch a file or object from an archive. Throws an error if requesting a target that was not exported (see list_archive for archive contents).

fetch_archive(target_name, path_prefix = NULL, archive_file = "remake.zip")

Arguments

target_name
Name of a single file or
path_prefix
Optional path prefix for exported files only (not for objects). If given, a file path/to/file will be exported as path_prefix/path/to/file; this is useful to avoid overwriting existing data, as this will happen without warning.
archive_file
Name of the archive file to use, by default remake.zip.

Value

If target_name refers to an object, then the return value is the restored object. If target_name refers to a file, then the return value is the path to the restored file (including path_prefix if given).

Author

Rich FitzJohn