(input: string)
| 228 | }) |
| 229 | |
| 230 | const get = (input: string) => { |
| 231 | const file = path.normalize(input) |
| 232 | const state = store.file[file] |
| 233 | const content = state?.content |
| 234 | if (!content) return state |
| 235 | if (hasFileContent(file)) { |
| 236 | touchFileContent(file) |
| 237 | return state |
| 238 | } |
| 239 | touchFileContent(file, approxBytes(content)) |
| 240 | return state |
| 241 | } |
| 242 | |
| 243 | function withPath(input: string, action: (file: string) => unknown) { |
| 244 | return action(path.normalize(input)) |
no test coverage detected