MCPcopy
hub / github.com/continuedev/continue / getUriPathBasename

Function getUriPathBasename

core/util/uri.ts:87–91  ·  view source on GitHub ↗
(uri: string)

Source from the content-addressed store, hash-verified

85 Returns just the file or folder name of a URI
86*/
87export function getUriPathBasename(uri: string): string {
88 const path = getCleanUriPath(uri);
89 const basename = path.split("/").pop() || "";
90 return decodeURIComponent(basename);
91}
92
93export function getFileExtensionFromBasename(basename: string) {
94 const parts = basename.split(".");

Callers 15

createNewFileImplFunction · 0.90
readFileRangeImplFunction · 0.90
readFileImplFunction · 0.90
updateMethod · 0.90
shouldIgnoreFunction · 0.90
updateMethod · 0.90
updateMethod · 0.90
loadSubmenuItemsMethod · 0.90
loadSubmenuItemsMethod · 0.90
loadJsonMcpConfigsFunction · 0.90

Calls 2

getCleanUriPathFunction · 0.85
popMethod · 0.45

Tested by

no test coverage detected