[−][src]Function dia_args::paths::permissions::match
pub fn match<P>(file: P, permissions: Permissions) -> Result<()> where
P: AsRef<Path>,
Ensures that input file's permissions match the ones you provide
This function always returns Ok(())
on non-Unix systems.
Examples
use dia_args::paths::permissions; #[cfg(unix)] assert!(permissions::r#match(file!(), 0o000).is_err()); #[cfg(not(unix))] assert!(permissions::r#match(file!(), 0o000).is_ok());