Skip to contents

The project is written atomically: to a temporary file in the target directory that then replaces path, so a failed write keeps the previous file. An image read with at_read_image() is saved with a versioned source descriptor (path, reader, options and file signature) instead of its pixels, and is reopened from it on load. A hand-built in-memory image keeps its pixels.

Usage

at_save_project(project, path, overwrite = FALSE, call = rlang::caller_env())

Arguments

project

An annot_project.

path

Output .rds path.

overwrite

Logical; overwrite an existing file. Default FALSE.

call

The calling environment, for error reporting.

Value

The path, invisibly.

Examples

p <- tempfile(fileext = ".rds")
at_save_project(at_example_project(), p)