Skip to main content

ensure_replay_directory

Function ensure_replay_directory 

Source
pub fn ensure_replay_directory(directory: &Path) -> Result<()>
Expand description

What: Make the directory of one replay, accepting one that subsumption already made for its base index. Why: Every other failure leaves the replay without a place for its index.

In TS you’d write (pseudocode):

await mkdir(directory, { mode: 0o700 }).catch((error) => { if (error.code !== 'EEXIST') throw error; });