diff options
author | Bert Belder <bertbelder@gmail.com> | 2010-11-25 01:26:19 +0100 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2010-12-20 23:50:43 +0100 |
commit | 51c686728091657d9f16625c1c8500d4b987df81 (patch) | |
tree | 5183c00488f0ef4dbd3c9bea06cec1e4a2072a4d /src/node_file.cc | |
parent | f9a74a2327f1a45e3da517e5c222b3e37464093d (diff) | |
download | node-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.cc | 2 |
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)); |