title: Accessing a network drive in nodejs?
body: <p>I'm trying to list the files in the S:/test folder, which is in my network (it's not a local directory). I was wondering how to do this? The code so far looks like this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const testFolder = 's:/test';
  const fs = require('fs');
  fs.readdir(testFolder, (err, files) =&gt; {
    files.forEach(file =&gt; {
      console.log(file);
    });
  })</code></pre>
  </div>
  </div>
  </p>
  
  <p>I've tried changing the path to S:test, s:\test to no avail, the error is always "Cannot read 'forEach' of undefined"</p>