summaryrefslogtreecommitdiff
path: root/std/path/interface.ts
diff options
context:
space:
mode:
authorNayeem Rahman <muhammed.9939@gmail.com>2019-10-16 19:39:33 +0100
committerRyan Dahl <ry@tinyclouds.org>2019-10-16 14:39:33 -0400
commitf51dcc12d7a75a677529d63eb53d7a577d5b9289 (patch)
tree67c5ee1026a6da84e68b249a77067bfd0b313532 /std/path/interface.ts
parent99d8ac70dbf412ee5de9ad2370c75dcd51cc5def (diff)
std: Move fs/path to the top-level (#3100)
Diffstat (limited to 'std/path/interface.ts')
-rw-r--r--std/path/interface.ts27
1 files changed, 27 insertions, 0 deletions
diff --git a/std/path/interface.ts b/std/path/interface.ts
new file mode 100644
index 000000000..b31c89ea7
--- /dev/null
+++ b/std/path/interface.ts
@@ -0,0 +1,27 @@
+/**
+ * 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>;