Crate pgs_files [−] [src]
A Library for parsing /etc/{passwd,group,shadow} files.
Example Usage
Print my username
, uid
, homedir
, and shell
extern crate pgs_files; use pgs_files::passwd; fn main() { let entry = passwd::get_entry_by_name("gary"); match entry { Some(user) => { println!("{}: {} {} {}", user.name, user.uid, user.dir, user.shell ); }, None => { println!("No such user!"); } }; }
Modules
group |
Fuctions and Structs for dealing with /etc/group |
passwd |
Fuctions and Structs for dealing with /etc/passwd |
shadow |
Fuctions and Structs for dealing with /etc/shadow |
Structs
Entries |
Traits
Entry |
A Trait to represent an entry of data from an
/etc/{ |