Skip to main content

zerolaunch_plugin_api/services/shell/
resource_loader.rs

1use std::collections::HashMap;
2use std::path::Path;
3
4/// 平台资源加载器 trait,定义平台原语。
5/// 各平台实现通过系统 API 加载本地化字符串资源,
6/// 插件通过 PluginHandle 委托调用。
7pub trait ResourceLoader: Send + Sync {
8    /// 解析指定目录下的 desktop.ini 文件,提取 [LocalizedFileNames] 部分。
9    /// 参数:dir_path - 要解析的目录路径。
10    /// 返回:从原始文件名到本地化名称的映射。
11    fn parse_localized_names_from_dir(&self, dir_path: &Path) -> HashMap<String, String>;
12}