pub fn write_file<P: Into<PathBuf>>( target_dir: &Path, file: P, content: &str, chown: &Option<Chown>, ) -> Result<PathBuf>