pgs_files/
lib.rs

1//! A Library for parsing /etc/{passwd,group,shadow} files.
2//!
3//! # Example Usage
4//!
5//! Print my `username`, `uid`, `homedir`, and `shell`
6//!
7//! ```
8//! extern crate pgs_files;
9//!
10//! use pgs_files::passwd;
11//!
12//! fn main() {
13//!     let entry = passwd::get_entry_by_name("gary");
14//!     match entry {
15//!         Some(user) => {
16//!             println!("{}: {} {} {}",
17//!                      user.name, user.uid, user.dir, user.shell
18//!             );
19//!         },
20//!         None => { println!("No such user!"); }
21//!     };
22//! }
23//! ```
24
25extern crate libc;
26
27pub use entries::{Entries,Entry};
28
29mod entries;
30
31pub mod passwd;
32pub mod group;
33pub mod shadow;