Tries to lock this file exclusively.
impl File {
fn lock_exclusive(&self) -> Result<(), Errno>
}Note that this locking is voluntary. Other programs can continue to modify the file even if you hold a lock. All programs must cooperate and use the locking functions to get reliable locking.