Created
July 28, 2011 07:00
-
-
Save atsuya/1111128 to your computer and use it in GitHub Desktop.
fs stat thing on node 0.5.2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> 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