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

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/cap-primitives-3.4.2/src/rustix/fs/set_symlink_permissions_unchecked.rs
wasmtime-28.0.0 ./ext/cargo-vendor/cap-primitives-3.4.2/src/rustix/fs/set_symlink_permissions_unchecked.rs
wasmtime-27.0.0 ./ext/cargo-vendor/cap-primitives-3.4.1/src/rustix/fs/set_symlink_permissions_unchecked.rs
wasmtime-26.0.0 ./ext/cargo-vendor/cap-primitives-3.3.0/src/rustix/fs/set_symlink_permissions_unchecked.rs
wasmtime-25.0.2 ./ext/cargo-vendor/cap-primitives-3.2.0/src/rustix/fs/set_symlink_permissions_unchecked.rs
wasmtime-25.0.1 ./ext/cargo-vendor/cap-primitives-3.2.0/src/rustix/fs/set_symlink_permissions_unchecked.rs
wasmtime-25.0.0 ./ext/cargo-vendor/cap-primitives-3.2.0/src/rustix/fs/set_symlink_permissions_unchecked.rs
wasmtime-24.0.0 ./ext/cargo-vendor/cap-primitives-3.2.0/src/rustix/fs/set_symlink_permissions_unchecked.rs
wasmtime-23.0.2 ./ext/cargo-vendor/cap-primitives-3.1.0/src/rustix/fs/set_symlink_permissions_unchecked.rs
wasmtime-22.0.0 ./ext/cargo-vendor/cap-primitives-3.1.0/src/rustix/fs/set_symlink_permissions_unchecked.rs
wasmtime-21.0.1 ./ext/cargo-vendor/cap-primitives-3.1.0/src/rustix/fs/set_symlink_permissions_unchecked.rs
wasmtime-20.0.2 ./ext/cargo-vendor/cap-primitives-3.1.0/src/rustix/fs/set_symlink_permissions_unchecked.rs
wasmtime-20.0.0 ./ext/cargo-vendor/cap-primitives-3.0.0/src/rustix/fs/set_symlink_permissions_unchecked.rs