basename
basename(
path,ext?):Promise<string>
Defined in: path.ts:734
Returns the last portion of a path. Trailing directory separators are ignored.
string
string
An optional file extension to be removed from the returned path.
Promise<string>
import { basename } from '@tauri-apps/api/path';const base = await basename('path/to/app.conf');assert(base === 'app.conf');1.0.0
© 2025 Tauri Contributors. CC-BY / MIT