Permissions in async_std::fs - Rust (original) (raw)

pub struct Permissions { /* private fields */ }

Expand description

Source§

Source

Returns the read-only flag.

§Examples
use async_std::fs;

let perm = fs::metadata("a.txt").await?.permissions();
println!("{:?}", perm.readonly());

Source

Configures the read-only flag.

§Examples
use async_std::fs;

let mut perm = fs::metadata("a.txt").await?.permissions();
perm.set_readonly(true);
fs::set_permissions("a.txt", perm).await?;

Source§

Source§

Source§

Source§

Tests for self and other values to be equal, and is used by ==.

1.0.0 · Source§

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Source§

Source§

§

§

§

§

§

§