On windows, stat() doesn't give you block (size) info

pull/22966/head
Bert Belder 2010-11-25 01:26:19 +01:00
parent f9a74a2327
commit 51c6867280
1 changed files with 2 additions and 0 deletions

View File

@ -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));