Skip to main content

open_file_writer

Function open_file_writer 

Source
pub fn open_file_writer(
    path: &Path,
    want: IoMode,
) -> Result<(Box<dyn FileIo>, IoMode)>
Expand description

Open the database data file for its sole writer and retain an advisory whole-file lock for exactly as long as the returned FileIo owns the fd. Readers deliberately use open_file_readonly and never contend here.