title: Difference between `File::exist?` and `File::exists?`
body: <p>On <a href="http://www.ruby-doc.org/core-1.9.3/File.html#method-c-exist-3F" rel="noreferrer">ruby-doc</a>, the documentation entries for <code>File::exist?</code> and <code>File::exists?</code> are duplicated with different semantics: one entry says returns <code>true</code> if <code>file_name</code> is a directory; the other says returns <code>true</code> if <code>file_name</code> is a file.</p>
  
  <p>I don't think either entry is correct. Both methods seem to be implemented in <a href="https://github.com/ruby/ruby/blob/trunk/file.c#L5444" rel="noreferrer"><code>file.c</code></a> using <code>rb_file_exist_p</code>, which, seems to try to call <code>fstat()</code> if the value passed is an IO, or <code>stat()</code> if it's a string. Both <code>fstat()</code> and <code>stat()</code> return <code>0</code> on success and <code>-1</code> on error, and this is passed back to <code>rb_file_exist_p</code>, and turned into a boolean result. It seems to me that</p>
  
  <ol>
  <li>there are two methods for making code read more easily; there are no semantic differences</li>
  <li>neither really relates to a <em>file</em> existing, but to whether a <em>file-like</em> item exists, e.g. a file, a dir, a socket, a fifo etc.</li>
  <li>perhaps the document could say that the methods tell the caller whether or not a thing that has file-like semantics is there, but more specific tests will tell what it actually is: e.g. directory?, file?, socket? etc.</li>
  </ol>
  
  <p>Is my understanding of the (lack of) difference in the methods correct, and is it worth suggesting a change to the document ?</p>