is_linux

Function is_linux 

Source
pub fn is_linux() -> bool
Expand description

Returns true if the operating system is Linux.

ยงExamples

let are_we_on_linux = jabba_lib::jos::is_linux();
Examples found in repository?
examples/os.rs (line 9)
3fn main() {
4    let op_sys = jos::get_operating_system_name();
5    println!("Your operating system is {:?}", op_sys);
6
7    println!(
8        "Is it Linux?   {}",
9        if jos::is_linux() { "yes" } else { "no" }
10    );
11    println!(
12        "Is it Windows? {}",
13        if jos::is_windows() { "yes" } else { "no" }
14    );
15}