diff options
| author | 木杉 <zhmushan@qq.com> | 2018-12-19 10:29:39 +0800 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2018-12-18 21:29:39 -0500 |
| commit | 2d58da520fffaeaee1bceeb33b6e3dc339ea68a3 (patch) | |
| tree | b6b8beb08e828b45ca51fb5bbc44330d45b62df5 /path/interface.ts | |
| parent | 3c8f564ab8c3087bac8256723aed9572faba756f (diff) | |
migrate deno_path to deno_std (denoland/deno_std#26)
Previously https://github.com/zhmushan/deno_path
Original: https://github.com/denoland/deno_std/commit/1a35f9daf5aa1c10c61d62cccbe7f9ae3c615a0e
Diffstat (limited to 'path/interface.ts')
| -rw-r--r-- | path/interface.ts | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/path/interface.ts b/path/interface.ts new file mode 100644 index 000000000..84a3030ff --- /dev/null +++ b/path/interface.ts @@ -0,0 +1,47 @@ +/** + * 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 interface FormatInputPathObject { + /** + * 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; +} |
