c# File.Exists cannot find file : <p>How to correctly define if file exist or not?</p>

<pre><code>string FilePath = Path.Combine(dir, "www", "index.html");

if (!File.Exists(FilePath))
{
     // get here anyway
}

string dir
{
     get
     {
          string codeBase = Assembly.GetExecutingAssembly().CodeBase;
          UriBuilder uri = new UriBuilder(codeBase);
          string path = Uri.UnescapeDataString(uri.Path);
          return Path.GetDirectoryName(path);
     }
}
</code></pre>

<p><code>File.Exists</code> return <code>false</code> anyway, whether the file exists or not.</p>
