Skip to main content

write

Function write 

Source
pub fn write(prepared: &Prepared, composed: &Composed) -> Result<(), RkError>
Expand description

Write the composed stage whole, then rename it into place.

Every file goes into a fresh sibling of the resolved root that this write created exclusively and holds open, written through the held descriptor rather than by name; the receipt goes last and owner-only; then, once the entry under the sibling’s name still carries the created identity, one rename lands it. A failure anywhere quarantines the entry under an unpredictable name in the same parent, judges it against the created identity, and removes it only on a match: an entry this write did not create is never removed.

§Errors

Any I/O failure, including the injected stop of the interruption proof, which reports as an I/O failure naming the path it stopped at.