title: Node.js check if path is file or directory
body: <p>I can't seem to get any search results that explain how to do this.</p>
  
  <p>All I want to do is be able to know if a given path is a file or a directory (folder).</p>