ref_write
Also documents
- ref_read
Usage
ref_write(reference, path, compress = "xz")
ref_read(path, trusted = FALSE)These wrappers make the on-disk compatibility contract explicit. ref_read()
migrates the unversioned development bundle used before Referent 0.1.0 and
rejects unknown schemas. Prediction also validates a frozen bundle.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
reference |
A ref_freeze or ref_fit. Plain fits are frozen before writing. |
path |
Path to an RDS bundle. |
compress |
Passed to saveRDS(). |
trusted |
Must be exactly TRUE to acknowledge that path came from anauthenticated, trusted source. The check occurs before deserialization. |
Security
Section titled “Security”RDS is R’s native object format, not a data-only exchange format, and
deserializing a malicious RDS file can execute code. ref_read() therefore
refuses to deserialize unless trusted = TRUE is supplied explicitly. Only
do that for a bundle from an authenticated, trusted source. Schema validation
happens after deserialization and does not make an untrusted RDS file safe.
ref_write() invisibly returns path; ref_read() returns a
validated ref_freeze.