콘텐츠로 이동

dirname

이 콘텐츠는 아직 번역되지 않았습니다.

Module @netwiv/api/path · Kind Function

import { dirname } from '@netwiv/api/path';

Returns the parent directory of a given path. Trailing directory separators are ignored.

function dirname(path: string): Promise<string>
import { dirname } from '@netwiv/api/path';
const dir = await dirname('/path/to/somedir/');
assert(dir === '/path/to');

Upstream since 1.0.0


Descriptions come from the pinned @tauri-apps/api@2.11.1 declarations (MIT OR Apache-2.0); imports are shown with @netwiv/api paths.