| 56 | name?: string | undefined; |
| 57 | } |
| 58 | interface PlatformPath { |
| 59 | /** |
| 60 | * Normalize a string path, reducing '..' and '.' parts. |
| 61 | * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. |
| 62 | * |
| 63 | * @param path string path to normalize. |
| 64 | * @throws {TypeError} if `path` is not a string. |
| 65 | */ |
| 66 | normalize(path: string): string; |
| 67 | /** |
| 68 | * Join all arguments together and normalize the resulting path. |
| 69 | * |
| 70 | * @param paths paths to join. |
| 71 | * @throws {TypeError} if any of the path segments is not a string. |
| 72 | */ |
| 73 | join(...paths: string[]): string; |
| 74 | /** |
| 75 | * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. |
| 76 | * |
| 77 | * Starting from leftmost {from} parameter, resolves {to} to an absolute path. |
| 78 | * |
| 79 | * If {to} isn't already absolute, {from} arguments are prepended in right to left order, |
| 80 | * until an absolute path is found. If after using all {from} paths still no absolute path is found, |
| 81 | * the current working directory is used as well. The resulting path is normalized, |
| 82 | * and trailing slashes are removed unless the path gets resolved to the root directory. |
| 83 | * |
| 84 | * @param paths A sequence of paths or path segments. |
| 85 | * @throws {TypeError} if any of the arguments is not a string. |
| 86 | */ |
| 87 | resolve(...paths: string[]): string; |
| 88 | /** |
| 89 | * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. |
| 90 | * |
| 91 | * If the given {path} is a zero-length string, `false` will be returned. |
| 92 | * |
| 93 | * @param path path to test. |
| 94 | */ |
| 95 | isAbsolute(path: string): boolean; |
| 96 | /** |
| 97 | * Return the directory name of a path. Similar to the Unix dirname command. |
| 98 | * |
| 99 | * @param path the path to evaluate. |
| 100 | */ |
| 101 | dirname(path: string): string; |
| 102 | /** |
| 103 | * Return the last portion of a path. Similar to the Unix basename command. |
| 104 | * Often used to extract the file name from a fully qualified path. |
| 105 | * |
| 106 | * @param path the path to evaluate. |
| 107 | * @param suffix optionally, an extension to remove from the result. |
| 108 | */ |
| 109 | basename(path: string, suffix?: string): string; |
| 110 | /** |
| 111 | * Return the extension of the path, from the last '.' to end of string in the last portion of the path. |
| 112 | * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string. |
| 113 | * |
| 114 | * @param path the path to evaluate. |
| 115 | */ |
no outgoing calls
no test coverage detected