Lines Matching refs:mtime
40 // Ensure mtime has been written to disk
48 function check_mtime(resource, mtime, statSync) {
49 mtime = fs._toUnixTimestamp(mtime);
51 const real_mtime = fs._toUnixTimestamp(stats.mtime);
52 return mtime - real_mtime;
62 function expect_ok(syscall, resource, err, atime, mtime, statSync) {
63 const mtime_diff = check_mtime(resource, mtime, statSync);
82 [asPath, stats.mtime],
94 // Support easy setting same or different atime / mtime values.
95 const [pathType, atime, mtime = atime] = value;
101 fs.utimes(pathType(tmpdir.path), atime, mtime, common.mustCall((err) => {
102 expect_ok('utimes', tmpdir.path, err, atime, mtime);
104 fs.lutimes(pathType(lpath), atime, mtime, common.mustCall((err) => {
105 expect_ok('lutimes', lpath, err, atime, mtime, fs.lstatSync);
107 fs.utimes(pathType('foobarbaz'), atime, mtime, common.mustCall((err) => {
117 fs.futimes(fd, atime, mtime, common.mustCall((err) => {
118 expect_ok('futimes', fd, err, atime, mtime);
132 fs.utimesSync(pathType(tmpdir.path), atime, mtime);
133 expect_ok('utimesSync', tmpdir.path, undefined, atime, mtime);
135 fs.lutimesSync(pathType(lpath), atime, mtime);
136 expect_ok('lutimesSync', lpath, undefined, atime, mtime, fs.lstatSync);
141 fs.futimesSync(fd, atime, mtime);
142 expect_ok('futimesSync', fd, undefined, atime, mtime);
149 fs.utimesSync(pathType('foobarbaz'), atime, mtime);