forked from denoland/std
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mod.ts
58 lines (57 loc) · 1.81 KB
/
mod.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// Copyright the Browserify authors. MIT License.
// Ported mostly from https://github.com/browserify/path-browserify/
// This module is browser compatible.
/**
* Utilities for working with OS-specific file paths.
*
* Functions from this module will automatically switch to support the path style
* of the current OS, either `windows` for Microsoft Windows, or `posix` for
* every other operating system, eg. Linux, MacOS, BSD etc.
*
* To use functions for a specific path style regardless of the current OS
* import the modules from the platform sub directory instead.
*
* Example, for POSIX:
*
* ```ts
* import { fromFileUrl } from "@std/path/posix/from-file-url";
* import { assertEquals } from "@std/assert";
*
* assertEquals(fromFileUrl("file:///home/foo"), "/home/foo");
* ```
*
* Or, for Windows:
*
* ```ts
* import { fromFileUrl } from "@std/path/windows/from-file-url";
* import { assertEquals } from "@std/assert";
*
* assertEquals(fromFileUrl("file:///home/foo"), "\\home\\foo");
* ```
*
* Functions for working with URLs can be found in
* {@link ./doc/posix/~ | @std/path/posix}.
*
* @module
*/
export * from "./basename.ts";
export * from "./constants.ts";
export * from "./dirname.ts";
export * from "./extname.ts";
export * from "./format.ts";
export * from "./from_file_url.ts";
export * from "./is_absolute.ts";
export * from "./join.ts";
export * from "./normalize.ts";
export * from "./parse.ts";
export * from "./relative.ts";
export * from "./resolve.ts";
export * from "./to_file_url.ts";
export * from "./to_namespaced_path.ts";
export * from "./common.ts";
export * from "./types.ts";
export * from "./glob_to_regexp.ts";
export * from "./is_glob.ts";
export * from "./join_globs.ts";
export * from "./normalize_glob.ts";