Function tauri_wasm::plugin::fs::create_dir

source ·
pub async fn create_dir(dir: &Path, base_dir: BaseDirectory) -> Result<()>
Expand description

Creates a directory. If one of the path’s parent components doesn’t exist the promise will be rejected.

§Example

use tauri_wasm::plugin::fs;

fs::create_dir(dir, BaseDirectory::Download).expect("could not create directory");

Requires plugins > fs > createDir to be enabled.