title: Why can't I use System.IO.File methods in an MVC controller?
body: <p>I am trying to see if a file exists before using it in an MVC controller:</p>
  
  <pre><code>string path = "content/image.jpg";
  
  if (File.Exists(path))
  { 
      //Other code
  }
  </code></pre>
  
  <p>The <code>File</code> keyword is underlined in red, and the compiler shows an error:</p>
  
  <blockquote>
    <p><code>System.Web.MVC.Controller.File(string, string, string)</code> is a
    'method', witch is not valid in the given context.</p>
  </blockquote>
  
  <p>How can I use <code>File.Exists()</code> in a controller?</p>