How to check if a directory/file/symlink exists with one command in Ruby
The standard File module has the usual file tests available: RUBY_VERSION # => “1.9.2” bashrc = ENV[‘HOME’] + ‘/.bashrc’ File.exist?(bashrc) # => true File.file?(bashrc) # => true File.directory?(bashrc) # => false You should be able to find what you want there. OP: “Thanks but I need all three true or false” Obviously not. Ok, try … Read more