linux_mount_options

Crates.iolinux_mount_options
lib.rslinux_mount_options
version0.1.0
sourcesrc
created_at2020-07-22 22:15:26.233023
updated_at2020-07-22 22:15:26.233023
descriptionDetect file system, mount point and noatime of a folder the process has access to.
homepage
repositoryhttps://gitlab.com/dns2utf8/linux_mount_options
max_upload_size
id268359
size19,485
Stefan Schindler (dns2utf8)

documentation

README

linux_mount_options

crates.io docs.rs

Detect file system, mount point and noatime of a folder the process has access to.

Requirements

  • Access to /proc/mounts
  • Linux tested
    • It should work on *BSD. However, it is not tested.

Example:

First, add it to your Cargo.toml:

[dependencies]
linux_mount_options = "0"

In your main.rs:

fn main() -> Result<(), Box<dyn Error>> {
    let path = "/home";
    let info = linux_mount_options::detect(&path)?;
    println!("{}: {:?}", path, info);
    Ok( () )
}

If you are using logging based on the log infrastructure you will get timestamped and formatted output.

Commit count: 6

cargo fmt