(path, extensions, ignoreCase)
| 7751 | } |
| 7752 | ts.getDirectoryPath = getDirectoryPath; |
| 7753 | function getBaseFileName(path, extensions, ignoreCase) { |
| 7754 | path = normalizeSlashes(path); |
| 7755 | // if the path provided is itself the root, then it has not file name. |
| 7756 | var rootLength = getRootLength(path); |
| 7757 | if (rootLength === path.length) |
| 7758 | return ""; |
| 7759 | // return the trailing portion of the path starting after the last (non-terminal) directory |
| 7760 | // separator but not including any trailing directory separator. |
| 7761 | path = removeTrailingDirectorySeparator(path); |
| 7762 | var name = path.slice(Math.max(getRootLength(path), path.lastIndexOf(ts.directorySeparator) + 1)); |
| 7763 | var extension = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(name, extensions, ignoreCase) : undefined; |
| 7764 | return extension ? name.slice(0, name.length - extension.length) : name; |
| 7765 | } |
| 7766 | ts.getBaseFileName = getBaseFileName; |
| 7767 | function tryGetExtensionFromPath(path, extension, stringEqualityComparer) { |
| 7768 | if (!ts.startsWith(extension, ".")) |
no test coverage detected
searching dependent graphs…