(rel: string)
| 1173 | } |
| 1174 | |
| 1175 | export function folderForRelativePath(rel: string): NoteFolder | null { |
| 1176 | const normalized = normalizeVaultRelativePath(rel) |
| 1177 | const top = normalized.split('/')[0] |
| 1178 | if (SYSTEM_FOLDERS.has(top as NoteFolder)) return top as NoteFolder |
| 1179 | if (!top || top.startsWith('.')) return null |
| 1180 | if (RESERVED_ROOT_NAMES.has(top)) return null |
| 1181 | return 'inbox' |
| 1182 | } |
| 1183 | |
| 1184 | /** |
| 1185 | * Ensure the expected vault folder layout exists and seed a welcome note |
no test coverage detected