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

Function getDirName

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

Source from the content-addressed store, hash-verified

94}
95
96function getDirName(path: string): string {
97 if (path === "/") {
98 return "/";
99 }
100 const idx = path.lastIndexOf("/");
101 if (idx <= 0) {
102 return "/";
103 }
104 return path.slice(0, idx);
105}
106
107function getBaseName(path: string): string {
108 if (path === "/") {

Callers 3

ensureDirFunction · 0.85
buildEntriesFunction · 0.85
makeNotFoundInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected