2175c97 chore: Release file-owner version 0.1.2
~jpastuszek pushed to ~jpastuszek/file-owner git
Set and get Unix file owner and group.
UID/GUI numbers or user/group names can be used.
Note: This crate will only compile on Unix systems.
use file_owner::PathExt;
"/tmp/baz".set_owner("nobody").unwrap();
"/tmp/baz".set_group("nogroup").unwrap();
let o = "/tmp/baz".owner().unwrap();
o.id(); // 99
o.name(); // Some("nobody")
let g = "/tmp/baz".group().unwrap();
g.id(); // 99
g.name(); // Some("nogroup")
See module level documentation on docs.rs for more examples.