tauri_sys::path

Function resolve_resource

source
pub async fn resolve_resource(resource_path: &str) -> Result<PathBuf, Error>
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_sys::path::resolve_resource;

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