Sha256: 295e0914e0cfcf025634c1def683b8fae9a11703b15a93f5ee2bfa1f190e6a03

Contents?: true

Size: 514 Bytes

Versions: 13

Compression:

Stored size: 514 Bytes

Contents

use crate::fs::{Permissions, PermissionsExt};
use rustix::fs::{chmodat, AtFlags, Mode};
use std::path::Path;
use std::{fs, io};

pub(crate) fn set_permissions_impl(
    start: &fs::File,
    path: &Path,
    perm: Permissions,
) -> io::Result<()> {
    if !super::beneath_supported() {
        return super::super::super::fs::set_permissions_manually(start, path, perm);
    }

    Ok(chmodat(
        start,
        path,
        Mode::from_raw_mode(perm.mode() as _),
        AtFlags::RESOLVE_BENEATH,
    )?)
}

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/freebsd/fs/set_permissions_impl.rs
wasmtime-28.0.0 ./ext/cargo-vendor/cap-primitives-3.4.2/src/rustix/freebsd/fs/set_permissions_impl.rs
wasmtime-27.0.0 ./ext/cargo-vendor/cap-primitives-3.4.1/src/rustix/freebsd/fs/set_permissions_impl.rs
wasmtime-26.0.0 ./ext/cargo-vendor/cap-primitives-3.3.0/src/rustix/freebsd/fs/set_permissions_impl.rs
wasmtime-25.0.2 ./ext/cargo-vendor/cap-primitives-3.2.0/src/rustix/freebsd/fs/set_permissions_impl.rs
wasmtime-25.0.1 ./ext/cargo-vendor/cap-primitives-3.2.0/src/rustix/freebsd/fs/set_permissions_impl.rs
wasmtime-25.0.0 ./ext/cargo-vendor/cap-primitives-3.2.0/src/rustix/freebsd/fs/set_permissions_impl.rs
wasmtime-24.0.0 ./ext/cargo-vendor/cap-primitives-3.2.0/src/rustix/freebsd/fs/set_permissions_impl.rs
wasmtime-23.0.2 ./ext/cargo-vendor/cap-primitives-3.1.0/src/rustix/freebsd/fs/set_permissions_impl.rs
wasmtime-22.0.0 ./ext/cargo-vendor/cap-primitives-3.1.0/src/rustix/freebsd/fs/set_permissions_impl.rs
wasmtime-21.0.1 ./ext/cargo-vendor/cap-primitives-3.1.0/src/rustix/freebsd/fs/set_permissions_impl.rs
wasmtime-20.0.2 ./ext/cargo-vendor/cap-primitives-3.1.0/src/rustix/freebsd/fs/set_permissions_impl.rs
wasmtime-20.0.0 ./ext/cargo-vendor/cap-primitives-3.0.0/src/rustix/freebsd/fs/set_permissions_impl.rs