fn set_file_contents(
dirfd: &OwnedFd,
name: &OsStr,
stat: &Stat,
data: &[u8],
) -> Result<()>Expand description
Attempt to use O_TMPFILE + rename to atomically set file contents. Will fall back to a non-atomic write if the target doesn’t support O_TMPFILE.