@@ -2058,18 +2058,25 @@ declare module 'vscode' {
20582058
20592059 /**
20602060 * Create a new uri which path is the result of joining
2061- * the path of the base uri with the provided path fragments .
2061+ * the path of the base uri with the provided path segments .
20622062 *
2063- * * Note that `joinPath` only affects the path component
2063+ * - Note 1: `joinPath` only affects the path component
20642064 * and all other components (scheme, authority, query, and fragment) are
20652065 * left as they are.
2066- * * Note that the base uri must have a path; an error is thrown otherwise.
2066+ * - Note 2: The base uri must have a path; an error is thrown otherwise.
2067+ *
2068+ * The path segments are normalized in the following ways:
2069+ * - sequences of path separators (`/` or `\`) are replaced with a single separator
2070+ * - for `file`-uris on windows, the backslash-character (`\`) is considered a path-separator
2071+ * - the `..`-segment denotes the parent segment, the `.` denotes the current segement
2072+ * - paths have a root which always remains, for instance on windows drive-letters are roots
2073+ * so that is true: `joinPath(Uri.file('file:///c:/root'), '../../other').fsPath === 'c:/other'`
20672074 *
20682075 * @param base An uri. Must have a path.
2069- * @param pathFragments One more more path fragments
2076+ * @param pathSegments One more more path fragments
20702077 * @returns A new uri which path is joined with the given fragments
20712078 */
2072- export function joinPath ( base : Uri , ...pathFragments : string [ ] ) : Uri ;
2079+ export function joinPath ( base : Uri , ...pathSegments : string [ ] ) : Uri ;
20732080 }
20742081
20752082 //#endregion
0 commit comments