aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/atty.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/atty.rs b/examples/atty.rs
new file mode 100644
index 0000000..3b3635e
--- /dev/null
+++ b/examples/atty.rs
@@ -0,0 +1,9 @@
+extern crate atty;
+
+use atty::{is, Stream};
+
+fn main() {
+ println!("stdout? {}", is(Stream::Stdout));
+ println!("stderr? {}", is(Stream::Stderr));
+ println!("stdin? {}", is(Stream::Stdin));
+}