title: Check if file or folder by given path exists
body: <p>I'm getting the user to pass a path as a string.</p>
  
  <p>A <strong>path</strong> could be something like</p>
  
  <p><code>C:\someFolder</code></p>
  
  <p><code>C:\someFolder\someFile</code></p>
  
  <p><code>C:\someFolder\someFile.jpg</code></p>
  
  <p>I want to check if the given path is a file or folder, and if it is a file, I want to check if it actually exits. </p>
  
  <p>I've been using <code>FileAttributes fileRoot = File.GetAttributes(@path);</code> to check if its a file or a folder but it doesn't work properly.</p>