Function umask
pub unsafe fn umask(mode: u32) -> Result<u32, i32> ⓘ
Available on crate feature
dep_nc
only.Expand description
Set file mode creation mask.
§Examples
let new_mask = 0o077;
let ret = unsafe { nc::umask(new_mask) };
assert!(ret.is_ok());
let old_mask = ret.unwrap();
let ret = unsafe { nc::umask(old_mask) };
assert_eq!(ret, Ok(new_mask));