Files
neuron/packages/opencode/src/tool/util/file-times.ts
T
Dax Raad f3da73553c sync
2025-05-30 20:48:36 -04:00

21 lines
500 B
TypeScript

import { App } from "../../app/app";
export namespace FileTimes {
export const state = App.state("tool.filetimes", () => ({
read: new Map<string, Date>(),
write: new Map<string, Date>(),
}));
export function read(filePath: string) {
state().read.set(filePath, new Date());
}
export function write(filePath: string) {
state().write.set(filePath, new Date());
}
export function get(filePath: string): Date | null {
return state().read.get(filePath) || null;
}
}