(p: string)
| 82 | const getFilePrefix = (d = new Date()) => d.toISOString().split('T', 1)[0] |
| 83 | const getFilePath = (p: string) => join(p, `${getFilePrefix()}${fileSuffix}`) |
| 84 | const getLogFilesIn = (p: string) => |
| 85 | readdir(p, { withFileTypes: true }) |
| 86 | .then(entries => entries.filter(x => x.isFile() && pathRe.test(x.name))) |
| 87 | .catch(error('readdir')) |
| 88 | |
| 89 | const pruneDirectory = async (p: string) => { |
| 90 | const all = await getLogFilesIn(p) |
no test coverage detected