Skip to main content

build_resource_path

Function build_resource_path 

Source
pub fn build_resource_path(
    plugin_id: &str,
    filename: Option<&str>,
) -> Result<String, HostApiError>
Expand description

构建资源存储路径,校验文件名防止路径遍历攻击。 使用 PathBuf 确保路径构建的安全性。 返回 Unix 风格路径(存储后端约定)。 供宿主实现 PluginHost 资源操作时使用。