From d3586a2afafb9f91d33c807f60f0fe434f92d117 Mon Sep 17 00:00:00 2001 From: MidnightCrowing <110297461+MidnightCrowing@users.noreply.github.com> Date: Mon, 12 May 2025 16:35:35 +0800 Subject: [PATCH] docs(api): fix incorrect example and clarify description for dirname in path API docs (#13417) --- packages/api/src/path.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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