refactor: migrate FileDiscovery.ts to use vault.adapter

- Replace fs.access/readdir with vault.adapter methods
- Replace path.join with PathUtils.joinPath for vault paths
- Add plugin parameter to methods for vault.adapter access
- Keep path module for basename operations on external files
- Add fs fallback when plugin unavailable (external tool output)
- Update PdfToImageConverter.ts to pass plugin to FileDiscovery
- Maintain dual approach for vault and external file discovery
This commit is contained in:
Jarvis committed 2025-09-25 12:30:25 +02:00
1 parent ee79ed3f74
commit 497407e288
2 files changed
+110 -18

No files matched your search

+1 -1
View File
@@ -124,7 +124,7 @@ export class PdfToImageConverter {
}
// Find the generated image file (may have different name than expected)
const fileDiscovery = await FileDiscovery.findGeneratedFile(outputDir, expectedOutputFileName);
const fileDiscovery = await FileDiscovery.findGeneratedFile(outputDir, expectedOutputFileName, this.plugin);
if (!fileDiscovery.found) {
return {
imagePath: '',