title: is there is any way that i can get a folder stats with node js
body: <p>Is there any way that i can get a folder stats with <strong>node js</strong>?.
  I want a function in <code>nodejs</code> that i can see the folder stats not a file state
  i have tried this function</p>
  
  <pre><code>fs.stat(path,(error,state)=&gt;{
          console.log(state)
  })
  </code></pre>
  
  <p>but it seems like it just works for files not folders 
  im working on server-side with node.js
  my code in case you need it</p>
  
  <pre><code>let folders=fs.readdirSync(path.join(__dirname,'../movies/'));
  folders.map((paths)=&gt;{
      fs.stat(paths,(f,state)=&gt;{
          console.log(f,state)
      })
  
  })
  </code></pre>
  
  <p>files in the above code have only folders
  state is undefined
  and thats what i get an error</p>
  
  <pre><code>{ Error: ENOENT: no such file or directory, stat 'C:\Users\DELL N5559\Desktop\stock\Folder'
    errno: -4058,
    code: 'ENOENT',
    syscall: 'stat',
    path: 'C:\\Users\\DELL N5559\\Desktop\\stock\\Folder' }
      enter code here
      enter code here
  </code></pre>