How to use the _toUnixTimestamp function from fs
Find comprehensive JavaScript fs._toUnixTimestamp code examples handpicked from public code repositorys.
GitHub: nwjs/node
43 44 45 46 47 48 49 50 51 52 53
fs.fsyncSync(resource); return fs.fstatSync(resource); } function check_mtime(resource, mtime, statSync) { mtime = fs._toUnixTimestamp(mtime); const stats = stat_resource(resource, statSync); const real_mtime = fs._toUnixTimestamp(stats.mtime); return mtime - real_mtime; }
42
19
0
+ 3 other calls in file
3 4 5 6 7 8 9 10 11 12 13
const fs = require('fs'); [Infinity, -Infinity, NaN].forEach((input) => { assert.throws( () => { fs._toUnixTimestamp(input); }, { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError'
42
19
0
+ 5 other calls in file
GitHub: EzSylester/Node
37 38 39 40 41 42 43 44 45 46 47
return fs.fstatSync(resource); } } function check_mtime(resource, mtime) { var mtime = fs._toUnixTimestamp(mtime); var stats = stat_resource(resource); var real_mtime = fs._toUnixTimestamp(stats.mtime); // check up to single-second precision // sub-second precision is OS and fs dependant
0
0
0
fs.readFileSync is the most popular function in fs (2736 examples)