组件发现和动态加载系统

This commit is contained in:
YHH
2025-10-15 00:40:27 +08:00
parent b757c1d06c
commit cbfe09b5e9
8 changed files with 861 additions and 13 deletions

View File

@@ -35,6 +35,20 @@ export class TauriAPI {
outputPath
});
}
/**
* 扫描目录查找匹配模式的文件
*/
static async scanDirectory(path: string, pattern: string): Promise<string[]> {
return await invoke<string[]>('scan_directory', { path, pattern });
}
/**
* 读取文件内容
*/
static async readFileContent(path: string): Promise<string> {
return await invoke<string>('read_file_content', { path });
}
}
/**