Skip to navigation

holoscan::config_io::try_save

Beta
View as Markdown
HOLOSCAN_CONFIG_IO_EXPORT config::ConfigResult<SaveResult> holoscan::config_io::try_save(
const config::Document &document,
const std::filesystem::path &path,
Format format,
SaveOptions options = {}
)

Try to persist one document with guarded same-directory atomic replacement.

Returns: Installed-byte evidence, or a structured failure carrying operation stage and destination state. A kReplaced failure means replacement completed but metadata flush failed.

Parameters

document
const config::Document &

Immutable source document.

path
const std::filesystem::path &

Destination path. Its parent must already exist.

format
Format

Explicit destination syntax.

options
SaveOptionsDefaults to {}

Compare-and-swap, durability, wait, and output-limit policy.