(context: ScanContext)
| 542 | } |
| 543 | |
| 544 | function scanNotes(context: ScanContext): void { |
| 545 | const paths = getNotesPaths(getVaultPath()) |
| 546 | const records: EntityScanRecord[] = [] |
| 547 | |
| 548 | listFolders(paths.notesRoot).forEach((folderPath) => { |
| 549 | const metaPath = path.join(paths.notesRoot, folderPath, META_FILE_NAME) |
| 550 | if (!fs.pathExistsSync(metaPath)) { |
| 551 | addItem( |
| 552 | context, |
| 553 | createFileItem({ |
| 554 | action: 'create-folder-metadata', |
| 555 | absolutePath: path.join(paths.notesRoot, folderPath), |
| 556 | kind: 'folder', |
| 557 | relativePath: folderPath, |
| 558 | space: 'notes', |
| 559 | status: 'pending', |
| 560 | }), |
| 561 | ) |
| 562 | } |
| 563 | }) |
| 564 | |
| 565 | listMarkdownFiles(paths.notesRoot).forEach((filePath) => { |
| 566 | const record = inspectMarkdownEntity({ |
| 567 | context, |
| 568 | filePath, |
| 569 | kind: 'note', |
| 570 | rootPath: paths.notesRoot, |
| 571 | space: 'notes', |
| 572 | }) |
| 573 | if (record) { |
| 574 | records.push(record) |
| 575 | } |
| 576 | }) |
| 577 | |
| 578 | collectDuplicateIds(context, records) |
| 579 | } |
| 580 | |
| 581 | function scanHttp(context: ScanContext): void { |
| 582 | const paths = getHttpPaths(getVaultPath()) |
no test coverage detected