title: How to check if a file exists
body: <p>So my problem is basically is that I can't figure out a condition to give an error message if can't find the file given as argument.</p>
  
  <pre><code>if ARGV.empty?
      puts "Give me a file!"
  elseif [condition]
      puts "Can't find the file"
  else
      file = File.open(ARGV[0])
  </code></pre>
  
  <p>What I exactly need is the condition for the elseif.</p>