// 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";
 * const p = fromFileUrl("file:///home/foo");
 * console.log(p); // "/home/foo"
 * ```
 *
 * or, for `windows`:
 *
 * ```ts
 * import { fromFileUrl } from "@std/path/windows/from-file-url";
 * const p = fromFileUrl("file:///home/foo");
 * console.log(p); // "\\home\\foo"
 * ```
 *
 * This module is browser compatible.
 *
 * @module
 */

import * as _windows from "./windows/mod.ts";
import * as _posix from "./posix/mod.ts";

/** @deprecated This will be removed in 1.0.0. Import from {@link https://deno.land/std/path/windows/mod.ts} instead. */
export const win32: typeof _windows = _windows;

/** @deprecated This will be removed in 1.0.0. Import from {@link https://deno.land/std/path/posix/mod.ts} instead. */
export const posix: typeof _posix = _posix;

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 "./_interface.ts";
export * from "./glob_to_regexp.ts";
export * from "./is_glob.ts";
export * from "./join_globs.ts";
export * from "./normalize_glob.ts";

// denoCacheMetadata={"headers":{"x-content-type-options":"nosniff","cf-cache-status":"HIT","cf-ray":"a223e6564ea77db6-LAX","access-control-expose-headers":"*","cross-origin-resource-policy":"cross-origin","content-length":"2164","date":"Tue, 28 Jul 2026 12:31:14 GMT","x-jsr-backend":"modules","server":"cloudflare","access-control-allow-origin":"*","vary":"Origin","etag":"\"e8b6af6606d0493b766630cd63e1510f\"","content-security-policy":"default-src 'none'; script-src 'none'; style-src 'none'; img-src 'none'; font-src 'none'; connect-src 'none'; frame-src 'none'; object-src 'none'; frame-ancestors 'none'; sandbox; form-action 'none';","x-robots-tag":"noindex","cache-control":"public, max-age=31536000, immutable","nel":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}","alt-svc":"h3=\":443\"; ma=86400","content-type":"text/typescript","age":"1294262","set-cookie":"__cf_bm=bY_wSQiJhEuvUPWkq11F4EJ6FAqdE85TNk1lNaiCzUQ-1785241874.9374664-1.0.1.1-FXzGMQGcj0wbErpLanADEmoChy_Vxv3BeHnOrjTs3K31Dj5VJtCiy.u.IlNKhxiycvTYP.6sas7O43qXWeD.GOqQ__GPP5oSadtK0TFJ8AHfDq.9mJyePLsfHshrE0n4; HttpOnly; SameSite=None; Secure; Path=/; Domain=jsr.io; Expires=Tue, 28 Jul 2026 13:01:14 GMT","accept-ranges":"bytes","report-to":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=%2BqKLyvSpIrzourB3Ft2feA3xM%2BWZQz%2BikaTdVwg0ySVnAkH5043swWI0yn0PDO5cbSo1h2SCswhcEHYehcEDtJj%2FN8rBTej%2FCWPM2hT7qT9ScsN6z7r3fOw%3D\"}]}"},"url":"https://jsr.io/@std/path/0.224.0/mod.ts","time":1785241874}