(text: string, mtimeMs?: number)
| 98 | ) |
| 99 | |
| 100 | const writeCacheText = (text: string, mtimeMs?: number) => |
| 101 | Effect.promise(async () => { |
| 102 | await mkdir(Global.Path.cache, { recursive: true }) |
| 103 | await writeFile(cacheFile, text) |
| 104 | if (mtimeMs !== undefined) { |
| 105 | const t = mtimeMs / 1000 |
| 106 | await utimes(cacheFile, t, t) |
| 107 | } |
| 108 | }) |
| 109 | |
| 110 | const writeCache = (data: object, mtimeMs?: number) => writeCacheText(JSON.stringify(data), mtimeMs) |
| 111 |
no outgoing calls
no test coverage detected