diff --git a/packages/api/src/path.ts b/packages/api/src/path.ts index b1b4ac440..117f541b6 100644 --- a/packages/api/src/path.ts +++ b/packages/api/src/path.ts @@ -674,12 +674,12 @@ async function join(...paths: string[]): Promise { } /** - * 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