pub fn is_mounted(device: &Path) -> Result<bool>Expand description
Check whether a device path appears as a mount source in /proc/mounts.
Canonicalizes the given path and compares it against each mount source. Symlinks and relative paths are handled correctly.
ยงErrors
Returns an error if the path cannot be canonicalized or /proc/mounts
cannot be read.