pub fn write_bytes_with_fallback(
path: &Path,
bytes: &[u8],
permissions: Option<&Permissions>,
) -> Result<(), String>Expand description
Atomic write with the read-only-directory in-place fallback (#459). Tries the
crash-atomic temp+rename first; if that fails because the directory is
read-only/permission-denied but an existing file inode is writable, overwrite
it in place. permissions, when given, is applied to the written file.