mirror of
https://github.com/denoland/deno.git
synced 2025-10-02 23:24:37 +00:00
fix(std/path): Support browsers (#6003)
This commit is contained in:
parent
464f5bf769
commit
10573183af
10 changed files with 47 additions and 18 deletions
29
std/path/_interface.ts
Normal file
29
std/path/_interface.ts
Normal file
|
@ -0,0 +1,29 @@
|
|||
/** This module is browser compatible. */
|
||||
|
||||
/**
|
||||
* A parsed path object generated by path.parse() or consumed by path.format().
|
||||
*/
|
||||
export interface ParsedPath {
|
||||
/**
|
||||
* The root of the path such as '/' or 'c:\'
|
||||
*/
|
||||
root: string;
|
||||
/**
|
||||
* The full directory path 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;
|
||||
}
|
||||
|
||||
export type FormatInputPathObject = Partial<ParsedPath>;
|
Loading…
Add table
Add a link
Reference in a new issue