We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe191fe commit 129f747Copy full SHA for 129f747
1 file changed
src/harness/vfs.ts
@@ -414,12 +414,16 @@ namespace vfs {
414
* NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module.
415
*/
416
public utimesSync(path: string, atime: Date, mtime: Date) {
417
+ if (this.isReadonly) throw createIOError("EROFS");
418
+ if (!isFinite(+atime) || !isFinite(+mtime)) throw createIOError("EINVAL");
419
+
420
const entry = this._walk(this._resolve(path));
421
if (!entry || !entry.node) {
422
throw createIOError("ENOENT");
423
}
424
entry.node.atimeMs = +atime;
425
entry.node.mtimeMs = +mtime;
426
+ entry.node.ctimeMs = this.time();
427
428
429
/**
0 commit comments