// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

/**
 * A parsed path object generated by path.parse() or consumed by path.format().
 *
 * @example
 * ```ts
 * import { parse } from "@std/path";
 *
 * const parsedPathObj = parse("c:\\path\\dir\\index.html");
 * parsedPathObj.root; // "c:\\"
 * parsedPathObj.dir; // "c:\\path\\dir"
 * parsedPathObj.base; // "index.html"
 * parsedPathObj.ext; // ".html"
 * parsedPathObj.name; // "index"
 * ```
 */
export interface ParsedPath {
  /**
   * The root of the path such as '/' or 'c:\'
   */
  root: string;
  /**
   * The full directory path of the parent such as '/home/user/dir' or 'c:\path\dir'
   */
  dir: string;
  /**
   * The file name including extension (if any) such as 'index.html'
   */
  base: string;
  /**
   * The file extension (if any) such as '.html'
   */
  ext: string;
  /**
   * The file name without extension (if any) such as 'index'
   */
  name: string;
}

// denoCacheMetadata={"headers":{"content-type":"text/typescript","x-robots-tag":"noindex","via":"1.1 google","x-goog-stored-content-encoding":"identity","content-length":"997","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';","date":"Fri, 14 Nov 2025 16:51:35 GMT","access-control-allow-origin":"*","access-control-expose-headers":"*","cross-origin-resource-policy":"cross-origin","x-goog-generation":"1730457482943843","x-content-type-options":"nosniff","expires":"Sat, 14 Nov 2026 16:51:35 GMT","x-goog-storage-class":"STANDARD","x-jsr-cache-id":"SFO-fbae48ad","age":"1415","alt-svc":"h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000","etag":"\"bdccb7209cc8f0bfbf715789ef00cfdc\"","last-modified":"Fri, 01 Nov 2024 10:38:02 GMT","accept-ranges":"bytes","server":"UploadServer","x-goog-metageneration":"1","x-goog-stored-content-length":"997","x-guploader-uploadid":"AOCedOENACDyx37JY7s7yAg_2GUdhhEroaAxzdLK-ZU7om8Ie1_aSx77SId5ck1FQUGLWFdep2T7vQ","cache-control":"public, max-age=31536000, immutable","x-goog-hash":"crc32c=zbo7Gg==,md5=vcy3IJzI8L+/cVeJ7wDP3A==","x-jsr-cache-status":"hit"},"url":"https://jsr.io/@std/path/1.0.8/types.ts","time":1763140510}