mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-02 19:45:46 +00:00
12 lines
216 B
Rust
12 lines
216 B
Rust
|
extern crate termion;
|
||
|
|
||
|
use std::fs;
|
||
|
|
||
|
fn main() {
|
||
|
if termion::is_tty(&fs::File::create("/dev/stdout").unwrap()) {
|
||
|
println!("This is a TTY!");
|
||
|
} else {
|
||
|
println!("This is not a TTY :(");
|
||
|
}
|
||
|
}
|