deno.land / std@0.224.0 / path / dirname.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.// This module is browser compatible.
import { isWindows } from "./_os.ts";import { dirname as posixDirname } from "./posix/dirname.ts";import { dirname as windowsDirname } from "./windows/dirname.ts";
/** * Return the directory path of a `path`. * @param path - path to extract the directory from. */export function dirname(path: string): string { return isWindows ? windowsDirname(path) : posixDirname(path);}
std

Version Info

Tagged at
3 weeks ago