Sha256: 8adccafa475dcfc1bc3989af73374d90683c1be4953ef812e5fd606f968d7b7a

Contents?: true

Size: 455 Bytes

Versions: 38

Compression:

Stored size: 455 Bytes

Contents

use crate::fs::asyncify;

use std::fs::Permissions;
use std::io;
use std::path::Path;

/// Changes the permissions found on a file or a directory.
///
/// This is an async version of [`std::fs::set_permissions`][std]
///
/// [std]: fn@std::fs::set_permissions
pub async fn set_permissions(path: impl AsRef<Path>, perm: Permissions) -> io::Result<()> {
    let path = path.as_ref().to_owned();
    asyncify(|| std::fs::set_permissions(path, perm)).await
}

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/tokio-1.43.0/src/fs/set_permissions.rs
wasmtime-28.0.0 ./ext/cargo-vendor/tokio-1.43.0/src/fs/set_permissions.rs
wasmtime-27.0.0 ./ext/cargo-vendor/tokio-1.41.1/src/fs/set_permissions.rs
wasmtime-26.0.0 ./ext/cargo-vendor/tokio-1.41.0/src/fs/set_permissions.rs
wasmtime-25.0.2 ./ext/cargo-vendor/tokio-1.40.0/src/fs/set_permissions.rs
wasmtime-25.0.1 ./ext/cargo-vendor/tokio-1.39.3/src/fs/set_permissions.rs
wasmtime-25.0.0 ./ext/cargo-vendor/tokio-1.39.3/src/fs/set_permissions.rs
wasmtime-24.0.0 ./ext/cargo-vendor/tokio-1.39.3/src/fs/set_permissions.rs
wasmtime-23.0.2 ./ext/cargo-vendor/tokio-1.36.0/src/fs/set_permissions.rs
wasmtime-22.0.0 ./ext/cargo-vendor/tokio-1.36.0/src/fs/set_permissions.rs
wasmtime-21.0.1 ./ext/cargo-vendor/tokio-1.36.0/src/fs/set_permissions.rs
wasmtime-20.0.2 ./ext/cargo-vendor/tokio-1.36.0/src/fs/set_permissions.rs
wasmtime-20.0.0 ./ext/cargo-vendor/tokio-1.36.0/src/fs/set_permissions.rs
wasmtime-18.0.3 ./ext/cargo-vendor/tokio-1.36.0/src/fs/set_permissions.rs
wasmtime-17.0.1 ./ext/cargo-vendor/tokio-1.35.1/src/fs/set_permissions.rs
wasmtime-17.0.0 ./ext/cargo-vendor/tokio-1.35.1/src/fs/set_permissions.rs
wasmtime-16.0.0 ./ext/cargo-vendor/tokio-1.35.1/src/fs/set_permissions.rs
wasmtime-15.0.1 ./ext/cargo-vendor/tokio-1.35.1/src/fs/set_permissions.rs
wasmtime-15.0.0 ./ext/cargo-vendor/tokio-1.35.1/src/fs/set_permissions.rs
wasmtime-14.0.4 ./ext/cargo-vendor/tokio-1.33.0/src/fs/set_permissions.rs