MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / getBaseName

Function getBaseName

frontend/preview/mock/mockfilesystem.ts:107–113  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

105}
106
107function getBaseName(path: string): string {
108 if (path === "/") {
109 return "/";
110 }
111 const idx = path.lastIndexOf("/");
112 return idx < 0 ? path : path.slice(idx + 1);
113}
114
115function getMimeType(path: string, isdir: boolean): string {
116 if (isdir) {

Callers 3

ensureDirFunction · 0.85
buildEntriesFunction · 0.85
makeNotFoundInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected