mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
docs(api): fix incorrect example and clarify description for dirname in path API docs (#13417)
This commit is contained in:
@@ -674,12 +674,12 @@ async function join(...paths: string[]): Promise<string> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the directory name of a `path`. Trailing directory separators are ignored.
|
||||
* Returns the parent directory of a given `path`. Trailing directory separators are ignored.
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { dirname } from '@tauri-apps/api/path';
|
||||
* const dir = await dirname('/path/to/somedir/');
|
||||
* assert(dir === 'somedir');
|
||||
* assert(dir === '/path/to');
|
||||
* ```
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
||||
Reference in New Issue
Block a user