Function mkdir
pub unsafe fn mkdir<P>(filename: P, mode: u32) -> Result<(), i32> ⓘ
Available on crate feature
dep_nc
only.Expand description
Create a directory.
§Examples
let path = "/tmp/nc-mkdir";
let ret = unsafe { nc::mkdir(path, 0o755) };
assert!(ret.is_ok());
let ret = unsafe { nc::unlinkat(nc::AT_FDCWD, path, nc::AT_REMOVEDIR) };
assert!(ret.is_ok());