2018-12-19 10:29:39 +08:00
|
|
|
// Copyright the Browserify authors. MIT License.
|
2020-03-31 02:36:55 +11:00
|
|
|
// Ported mostly from https://github.com/browserify/path-browserify/
|
2020-05-31 18:48:32 +01:00
|
|
|
/** This module is browser compatible. */
|
2018-12-19 10:29:39 +08:00
|
|
|
|
2020-11-14 02:51:11 +03:30
|
|
|
import { isWindows } from "../_util/os.ts";
|
2019-05-14 00:32:33 +08:00
|
|
|
import * as _win32 from "./win32.ts";
|
|
|
|
import * as _posix from "./posix.ts";
|
|
|
|
|
|
|
|
const path = isWindows ? _win32 : _posix;
|
|
|
|
|
|
|
|
export const win32 = _win32;
|
|
|
|
export const posix = _posix;
|
2020-03-31 02:36:55 +11:00
|
|
|
export const {
|
|
|
|
basename,
|
2020-04-29 21:20:55 +01:00
|
|
|
delimiter,
|
|
|
|
dirname,
|
2020-03-31 02:36:55 +11:00
|
|
|
extname,
|
|
|
|
format,
|
2020-04-29 21:20:55 +01:00
|
|
|
fromFileUrl,
|
|
|
|
isAbsolute,
|
|
|
|
join,
|
|
|
|
normalize,
|
2020-03-31 02:36:55 +11:00
|
|
|
parse,
|
2020-04-29 21:20:55 +01:00
|
|
|
relative,
|
|
|
|
resolve,
|
2020-03-31 02:36:55 +11:00
|
|
|
sep,
|
2020-10-19 13:36:53 +01:00
|
|
|
toFileUrl,
|
2020-04-29 21:20:55 +01:00
|
|
|
toNamespacedPath,
|
2020-03-31 02:36:55 +11:00
|
|
|
} = path;
|
2019-10-16 19:39:33 +01:00
|
|
|
|
2020-05-09 13:34:47 +01:00
|
|
|
export * from "./common.ts";
|
|
|
|
export { SEP, SEP_PATTERN } from "./separator.ts";
|
2020-05-31 18:48:32 +01:00
|
|
|
export * from "./_interface.ts";
|
2019-10-16 19:39:33 +01:00
|
|
|
export * from "./glob.ts";
|