title: Why does file.exists return FALSE despite being in list.files?
body: <p>I have a file <code>x</code> which appears in a directory, as proved by <code>list.files</code></p>
  
  <pre><code>x &lt;- "./data-raw/paths/calculate-route-by-FROM-TO/2017-05-2075--FROM-Flinders-Street-Railway-Station--Melbourne-Victoria-3004--VIC--TO-Melbourne-Sports-Aquatic-Centre--30-Aughtie-Dr--Melbourne-VIC-3206--VIC-csv"
  x %in% list.files("./data-raw/paths", recursive = TRUE, full.names = TRUE)
  # [1] TRUE
  file.exists(x)
  # [1] FALSE
  </code></pre>
  
  <p>Note that <code>x</code> lacks an extension, but I could not find such a caveat in <code>?file.exists</code>:</p>
  
  <blockquote>
    <p><code>file.exists</code> returns a logical vector indicating whether the files named by its argument exist. (Here ‘exists’ is in the sense of the system's <code>stat</code> call: a file will be reported as existing only if you have the permissions needed by stat. Existence can also be checked by <code>file.access</code>, which might use different permissions and so obtain a different result. Note that the existence of a file does not imply that it is readable: for that use <code>file.access</code>.) What constitutes a ‘file’ is system-dependent, but should include directories. (However, directory names must not include a trailing backslash or slash on Windows.) Note that if the file is a symbolic link on a Unix-alike, the result indicates if the link points to an actual file, not just if the link exists. Lastly, note the different function exists which checks for existence of R objects.</p>
  </blockquote>
  
  <p>The only hint from the documentation was that access restrictions might cause <code>FALSE</code>, and indeed <code>file.access(x)</code> is <code>-1</code> but I appear to have access to that file (as well as other very similar files which are not so affected).</p>