[go: up one dir, main page]

is_tty

Function is_tty 

Source
pub fn is_tty<T: AsRawFd>(stream: &T) -> bool
Expand description

Is this stream a TTY?

Examples found in repository?
examples/is_tty.rs (line 6)
5fn main() {
6    if termion::is_tty(&fs::File::create("/dev/stdout").unwrap()) {
7        println!("This is a TTY!");
8    } else {
9        println!("This is not a TTY :(");
10    }
11}