Add file type to stats.
This commit is contained in:
parent
e690ed5292
commit
984db2ceba
|
@ -37,9 +37,9 @@ fs.open('/myfile', 'w+', function(error, fd) {
|
||||||
fs.link('/myfile', '/myotherfile', function(error) {
|
fs.link('/myfile', '/myotherfile', function(error) {
|
||||||
if(error) throw error;
|
if(error) throw error;
|
||||||
console.log('linked');
|
console.log('linked');
|
||||||
fs.unlink('/myfile', function(error) {
|
fs.stat('/myfile', function(error, stats) {
|
||||||
if(error) throw error;
|
if(error) throw error;
|
||||||
console.log('unlinked');
|
console.log(stats);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -950,7 +950,8 @@ define(function(require) {
|
||||||
nlinks: result.nlinks,
|
nlinks: result.nlinks,
|
||||||
atime: result.atime,
|
atime: result.atime,
|
||||||
mtime: result.mtime,
|
mtime: result.mtime,
|
||||||
ctime: result.ctime
|
ctime: result.ctime,
|
||||||
|
type: result.mode,
|
||||||
};
|
};
|
||||||
deferred.resolve(stats);
|
deferred.resolve(stats);
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,6 +145,7 @@ describe('fs.stat', function() {
|
||||||
expect(_result['atime']).toEqual(jasmine.any(Number));
|
expect(_result['atime']).toEqual(jasmine.any(Number));
|
||||||
expect(_result['mtime']).toEqual(jasmine.any(Number));
|
expect(_result['mtime']).toEqual(jasmine.any(Number));
|
||||||
expect(_result['ctime']).toEqual(jasmine.any(Number));
|
expect(_result['ctime']).toEqual(jasmine.any(Number));
|
||||||
|
expect(_result['type']).toBeDefined();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue