Function tauri_wasm::api::path::resolve_resource

source ·
pub async fn resolve_resource(resource_path: &str) -> Result<PathBuf>
Expand description

Resolve the path to a resource file.

@param resourcePath The path to the resource. Must follow the same syntax as defined in tauri.conf.json > tauri > bundle > resources, i.e. keeping subfolders and parent dir components (../). @returns The full path to the resource.

use tauri_wasm::api::path::resolve_resource;

let resource_path = resolve_resource("script.sh").await?;