(relPath: string)
| 285 | |
| 286 | /** True for a database data file: new `<Name>.base/data.csv`, or a legacy loose `.csv`. */ |
| 287 | export function isDatabaseCsvPath(relPath: string): boolean { |
| 288 | if (formDirFromCsvPath(relPath)) return true |
| 289 | const lower = toPosixPath(relPath).toLowerCase() |
| 290 | // Legacy loose CSV — but not one that lives inside a `.base` folder. |
| 291 | if (formDirContaining(relPath)) return false |
| 292 | return lower.endsWith('.csv') && !lower.endsWith(`.csv${DATABASE_SIDECAR_SUFFIX}`) |
| 293 | } |
| 294 | |
| 295 | /** |
| 296 | * Given any file that belongs to a database (`data.csv`, `schema.json`, or a |
no test coverage detected