projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9a74a2
)
On windows, stat() doesn't give you block (size) info
author
Bert Belder
<bertbelder@gmail.com>
Thu, 25 Nov 2010 00:26:19 +0000
(
01:26
+0100)
committer
Bert Belder
<bertbelder@gmail.com>
Mon, 20 Dec 2010 22:50:43 +0000
(23:50 +0100)
src/node_file.cc
patch
|
blob
|
history
diff --git
a/src/node_file.cc
b/src/node_file.cc
index
04f3f31
..
ed289c4
100644
(file)
--- a/
src/node_file.cc
+++ b/
src/node_file.cc
@@
-253,11
+253,13
@@
Local<Object> BuildStatsObject(struct stat * s) {
/* total size, in bytes */
stats->Set(size_symbol, Number::New(s->st_size));
+#ifdef __POSIX__
/* blocksize for filesystem I/O */
stats->Set(blksize_symbol, Integer::New(s->st_blksize));
/* number of blocks allocated */
stats->Set(blocks_symbol, Integer::New(s->st_blocks));
+#endif
/* time of last access */
stats->Set(atime_symbol, NODE_UNIXTIME_V8(s->st_atime));