Skip to main content

ensure_durable_directory

Function ensure_durable_directory 

Source
pub fn ensure_durable_directory(path: &Path) -> Result<()>
Expand description

Creates every missing directory component with a crash-durable parent publication before returning.

Existing directories are re-synchronized on Unix. Windows treats them as a pre-established namespace because it has no documented directory flush primitive. A concurrent creator is accepted only after the winner is verified to be a real directory.

ยงErrors

Returns an I/O error if a component is not a directory, the path escapes through .., or the platform cannot durably publish a missing component.