This commit is contained in:
Dax Raad
2025-05-19 19:29:38 -04:00
parent fa8a46326a
commit 2437ce3f8b
14 changed files with 973 additions and 13 deletions

View File

@@ -0,0 +1,20 @@
import { App } from "../../app";
export namespace FileTimes {
export const state = App.state("tool.edit", () => ({
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;
}
}