Sha256: d482bd9901bb26c9b1c202ac5ac80fc9ca3e6fe2dd8c814b8fdaf1791bcd27c9
Contents?: true
Size: 473 Bytes
Versions: 13
Compression:
Stored size: 473 Bytes
Contents
use crate::fs::Permissions; #[cfg(unix)] use crate::fs::PermissionsExt; use rustix::fs::{chmodat, AtFlags, Mode}; use std::path::Path; use std::{fs, io}; /// This can just use `AT_SYMLINK_NOFOLLOW`. pub(crate) fn set_symlink_permissions_unchecked( start: &fs::File, path: &Path, perm: Permissions, ) -> io::Result<()> { let mode = Mode::from_bits_truncate(perm.mode().try_into().unwrap()); Ok(chmodat(start, path, mode, AtFlags::SYMLINK_NOFOLLOW)?) }
Version data entries
13 entries across 13 versions & 1 rubygems