Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Cannot get fs.stat for C:\ (root) on windows using fs.statSync #1786

Closed
busticated opened this issue Sep 28, 2011 · 2 comments
Closed

Cannot get fs.stat for C:\ (root) on windows using fs.statSync #1786

busticated opened this issue Sep 28, 2011 · 2 comments

Comments

@busticated
Copy link

Here's what I'm seeing:

C:\dev>node.exe -v
v0.5.7

C:\dev>node.exe
> var fs = require('fs');
> fs.statSync('C:\\');
Error: OK, The operation completed successfully.
 'C:\'
    at Object.statSync (fs.js:401:18)
    at repl:1:4
    at REPLServer.eval (repl.js:80:28)
    at repl.js:178:16
    at REPLServer.eval (repl.js:84:5)
    at Interface.<anonymous> (repl.js:170:12)
    at Interface.emit (events.js:67:17)
    at Interface._onLine (readline.js:162:10)
    at Interface._line (readline.js:425:8)
    at Interface._ttyWrite (readline.js:602:14)
>
> fs.statSync('C:\\dev');
{ dev: 2,
  ino: 0,
  mode: 16895,
  nlink: 1,
  uid: 0,
  gid: 0,
  rdev: 2,
  size: 0,
  atime: Fri, 12 Aug 2011 17:14:51 GMT,
  mtime: Fri, 12 Aug 2011 17:14:51 GMT,
  ctime: Wed, 03 Nov 2010 23:01:50 GMT }

On OS X, I can get an fs.stat object for root via fs.statSync('/');

@igorzi
Copy link

igorzi commented Sep 28, 2011

fixed in joyent/libuv@c9ae7a6

@koichik
Copy link

koichik commented Oct 10, 2011

This has fixed in v0.5.8. Closing.

@koichik koichik closed this as completed Oct 10, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants