瀏覽代碼

docs(api.js): Fix basename example, closes tauri-apps/tauri-docs#1180 (#6553)

Fabian-Lars 2 年之前
父節點
當前提交
23282873e7
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tooling/api/src/path.ts

+ 1 - 1
tooling/api/src/path.ts

@@ -772,7 +772,7 @@ async function extname(path: string): Promise<string> {
  * import { basename, resolveResource } from '@tauri-apps/api/path';
  * const resourcePath = await resolveResource('app.conf');
  * const base = await basename(resourcePath);
- * assert(base === 'app');
+ * assert(base === 'app.conf');
  * ```
  *
  * @param ext An optional file extension to be removed from the returned path.