doc.rust-lang.org
pub mod io
Unix-specific extensions to general I/O primitives.
module
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn symlink<P, Q>(original: P, link: Q) -> io::Result<()>
Creates a new symbolic link on the filesystem.
function
std
Stable since 1.1.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn lchown<P>(dir: P, uid: Option<u32>, gid: Option<u32>) -> io::Result<()>
Change the owner and group of the specified path, without dereferencing symbolic links.
function
std
Stable since 1.73.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn fchown<F>(fd: F, uid: Option<u32>, gid: Option<u32>) -> io::Result<()>
Change the owner and group of the file referenced by the specified open file descriptor.
function
std
Stable since 1.73.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn chroot<P>(dir: P) -> io::Result<()>
Change the root directory of the current process to the specified path.
function
std
Stable since 1.56.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn chown<P>(dir: P, uid: Option<u32>, gid: Option<u32>) -> io::Result<()>
Change the owner and group of the specified path.
function
std
Stable since 1.73.0
Version 1.100.0-nightly
doc.rust-lang.org
fn set_mode(&mut self, mode: u32)
Sets the mode permission bits.
method
std
Stable since 1.1.0
Version 1.100.0-nightly
doc.rust-lang.org
fn mode(&self) -> u32
Returns the mode permission bits
method
std
Stable since 1.1.0
Version 1.100.0-nightly
doc.rust-lang.org
fn from_mode(mode: u32) -> Self
Creates a new instance from the given mode permission bits.
associated_function
std
Stable since 1.1.0
Version 1.100.0-nightly
doc.rust-lang.org
pub trait PermissionsExt
Unix-specific extensions to fs::Permissions.
trait
std
Stable since 1.1.0
Version 1.100.0-nightly
doc.rust-lang.org
fn mode(&mut self, mode: u32) -> &mut Self
Sets the mode bits that a new file will be created with.
method
std
Stable since 1.1.0
Version 1.100.0-nightly
doc.rust-lang.org
fn custom_flags(&mut self, flags: i32) -> &mut Self
Pass custom flags to the flags argument of open.
method
std
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub trait OpenOptionsExt
Unix-specific extensions to fs::OpenOptions.
trait
std
Stable since 1.1.0
Version 1.100.0-nightly
doc.rust-lang.org
fn uid(&self) -> u32
Returns the user ID of the owner of this file.
method
std
Stable since 1.1.0
Version 1.100.0-nightly
doc.rust-lang.org
fn size(&self) -> u64
Returns the total size of this file in bytes.
method
std
Stable since 1.1.0
Version 1.100.0-nightly
doc.rust-lang.org
fn rdev(&self) -> u64
Returns the device ID of this file (if it is a special one).
method
std
Stable since 1.1.0
Version 1.100.0-nightly
doc.rust-lang.org
fn nlink(&self) -> u64
Returns the number of hard links pointing to this file.
method
std
Stable since 1.1.0
Version 1.100.0-nightly
doc.rust-lang.org
fn mtime_nsec(&self) -> i64
Returns the last modification time of the file, in nanoseconds since mtime.
method
std
Stable since 1.1.0
Version 1.100.0-nightly
doc.rust-lang.org
fn mtime(&self) -> i64
Returns the last modification time of the file, in seconds since Unix Epoch.
method
std
Stable since 1.1.0
Version 1.100.0-nightly
doc.rust-lang.org
fn mode(&self) -> u32
Returns the rights applied to this file.
method
std
Stable since 1.1.0
Version 1.100.0-nightly