How to use the utimesSync function from fs-extra
Find comprehensive JavaScript fs-extra.utimesSync code examples handpicked from public code repositorys.
GitHub: bcomnes/cpx2
60 61 62 63 64 65 66 67 68
} fs.chmodSync(output, stat.mode) if (options.preserve) { fs.chownSync(output, stat.uid, stat.gid) fs.utimesSync(output, stat.atime, stat.mtime) } }
3
28
0
GitHub: microsoft/devicescript
37 38 39 40 41 42 43 44 45 46 47
console.debug(`cp ${from} ${to}`) try { fs.mkdirSync(path.dirname(to)) } catch {} fs.copyFileSync(from, to) fs.utimesSync(to, new Date(), new Date(fromT)) } } const args = process.argv.slice(2)
4
24
9
GitHub: nstra9x/herond-core
60 61 62 63 64 65 66 67 68 69 70
} const updateFileUTimesIfOverrideIsNewer = (original, override) => { if (isOverrideNewer(original, override)) { const date = new Date() fs.utimesSync(original, date, date) console.log(original + ' is touched.') } }
0
0
1
+ 5 other calls in file
175 176 177 178 179 180 181 182 183 184
} } function updateTimes(path, atime, mtime) { if (exists(path)) { const normalizedPath = (0, path_1.normalize)(path); fs.utimesSync((0, path_1.normalize)(path), atime, mtime); // update cache if (readStatsCache.has(normalizedPath)) { readStatsCache.delete(normalizedPath); }
0
0
1
+ 14 other calls in file
fs-extra.readFileSync is the most popular function in fs-extra (9724 examples)