* Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). * * For example: * ```ts * getRootLength("a") === 0 // "" * getRootLength("/") === 1 // "/" * getRootLength("c:") =
(path)
| 7734 | * ``` |
| 7735 | */ |
| 7736 | function getRootLength(path) { |
| 7737 | var rootLength = getEncodedRootLength(path); |
| 7738 | return rootLength < 0 ? ~rootLength : rootLength; |
| 7739 | } |
| 7740 | ts.getRootLength = getRootLength; |
| 7741 | function getDirectoryPath(path) { |
| 7742 | path = normalizeSlashes(path); |
no test coverage detected
searching dependent graphs…