summaryrefslogtreecommitdiff
path: root/src/node_file.cc
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2010-11-25 01:26:19 +0100
committerBert Belder <bertbelder@gmail.com>2010-12-20 23:50:43 +0100
commit51c686728091657d9f16625c1c8500d4b987df81 (patch)
tree5183c00488f0ef4dbd3c9bea06cec1e4a2072a4d /src/node_file.cc
parentf9a74a2327f1a45e3da517e5c222b3e37464093d (diff)
downloadnode-new-51c686728091657d9f16625c1c8500d4b987df81.tar.gz
On windows, stat() doesn't give you block (size) info
Diffstat (limited to 'src/node_file.cc')
-rw-r--r--src/node_file.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/node_file.cc b/src/node_file.cc
index 04f3f3159d..ed289c40c8 100644
--- 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));