Skip to content

Instantly share code, notes, and snippets.

@atsuya
Created July 28, 2011 07:00
Show Gist options
  • Save atsuya/1111128 to your computer and use it in GitHub Desktop.
Save atsuya/1111128 to your computer and use it in GitHub Desktop.
fs stat thing on node 0.5.2
> require('fs').statSync('/usr')
{ dev: 234881026,
ino: 19201463,
mode: 16877,
nlink: 14,
uid: 0,
gid: 0,
rdev: 0,
size: 476,
blksize: 4096,
blocks: 0,
atime: Fri, 22 Jul 2011 08:03:17 GMT,
mtime: Fri, 22 Jul 2011 08:03:18 GMT,
ctime: Fri, 22 Jul 2011 08:03:18 GMT }
> require('fs').stat('/usr', function (er, s) { console.log(er), console.log(s); });
> null
{ dev: 234881026,
ino: 19201463,
mode: 16877,
nlink: 14,
uid: 0,
gid: 0,
rdev: 0,
size: 476,
blksize: 4096,
blocks: 0,
atime: Fri, 22 Jul 2011 08:03:17 GMT,
mtime: Fri, 22 Jul 2011 08:03:18 GMT,
ctime: Fri, 22 Jul 2011 08:03:18 GMT }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment