How to use the utimesSync function from graceful-fs

Find comprehensive JavaScript graceful-fs.utimesSync code examples handpicked from public code repositorys.

537
538
539
540
541
542
543
544
545
546
547
548
exports.unlink = Promise.promisify(fs.unlink);
exports.unlinkSync = fs.unlinkSync;


// utimes
exports.utimes = Promise.promisify(fs.utimes);
exports.utimesSync = fs.utimesSync;
exports.futimes = Promise.promisify(fs.futimes);
exports.futimesSync = fs.futimesSync;


// watch
fork icon9
star icon48
watch icon0

+ 7 other calls in file

98
99
100
101
102
103
104
105
106
107
108
	}
};


exports.utimesSync = (path, atime, mtime) => {
	try {
		return fs.utimesSync(path, atime, mtime);
	} catch (error) {
		throw new CpFileError(`utimes \`${path}\` failed: ${error.message}`, error);
	}
};
fork icon0
star icon0
watch icon0