From 51c686728091657d9f16625c1c8500d4b987df81 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 25 Nov 2010 01:26:19 +0100 Subject: [PATCH] On windows, stat() doesn't give you block (size) info --- src/node_file.cc | 2 ++ 1 file changed, 2 insertions(+) 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 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));