From: ts Date: 2005-01-31T21:49:27+09:00 Subject: Re: perl's -t and -B file tests in ruby? >>>>> "W" == Wybo Dekker writes: W> Does ruby have file tests like Perl's: W> -t : file (mostly STDIN) is attached to a tty uln% ri IO#tty? ---------------------------------------------------------------- IO#tty? ios.isatty => true or false ios.tty? => true or false ------------------------------------------------------------------------ Returns +true+ if _ios_ is associated with a terminal device (tty), +false+ otherwise. File.new("testfile").isatty #=> false File.new("/dev/tty").isatty #=> true uln% W> -B : file is binary Define what is a binary file ? Guy Decoux