How to use the fsyncSync function from fs
Find comprehensive JavaScript fs.fsyncSync code examples handpicked from public code repositorys.
GitHub: blockcollider/bcnode
48 49 50 51 52 53 54 55 56 57
exports.fdatasync = co.promisify(fs.fdatasync); exports.fdatasyncSync = fs.fdatasyncSync; exports.fstat = co.promisify(fs.fstat); exports.fstatSync = fs.fstatSync; exports.fsync = co.promisify(fs.fsync); exports.fsyncSync = fs.fsyncSync; exports.ftruncate = co.promisify(fs.ftruncate); exports.ftruncateSync = fs.ftruncateSync; exports.futimes = co.promisify(fs.futimes); exports.futimesSync = fs.futimesSync;
22
45
26
GitHub: nwjs/node
38 39 40 41 42 43 44 45 46 47 48
const stats = fs.fstatSync(resource); // Ensure mtime has been written to disk // except for directories on AIX where it cannot be synced if (common.isAIX && stats.isDirectory()) return stats; fs.fsyncSync(resource); return fs.fstatSync(resource); } function check_mtime(resource, mtime, statSync) {
42
19
0
581 582 583 584 585 586 587 588 589 590 591 592
common.runWithInvalidFD((fd) => { fs.fsync(fd, common.mustCall(validateError)); assert.throws( () => fs.fsyncSync(fd), validateError ); }); }
42
19
0
GitHub: nwjs/node
35 36 37 38 39 40 41 42 43 44 45 46 47
fs.copyFileSync(fileFixture, fileTemp); fs.open(fileTemp, 'a', 0o777, common.mustSucceed((fd) => { fs.fdatasyncSync(fd); fs.fsyncSync(fd); fs.fdatasync(fd, common.mustSucceed(() => { fs.fsync(fd, common.mustSucceed(() => { fs.closeSync(fd);
42
19
0
fs.readFileSync is the most popular function in fs (2736 examples)