title: Identifying the File System Root with Node.js
body: <p>I'm doing a basic operation where I start from a given directory, and I traverse up the filesystem until I hit the root. On Linux/Mac, the root is obviously <code>/</code> and on Windows it can be <code>C:\</code> or another drive letter of course. My question is whether or not there is a way for Node.js to identify what the root directory of the filesystem is.</p>
  
  <p>Currently, I'm resorting to simply checking the last directory against <code>path.normalize(dir + "/../")</code> to see if it stops changing. Is there a <code>process</code> property/method out there? Maybe a module?</p>