MCPcopy Create free account
hub / github.com/MiniMax-AI/OpenRoom / getDirPath

Function getDirPath

apps/webuiapps/src/lib/path.ts:49–53  ·  view source on GitHub ↗
(fullPath: string)

Source from the content-addressed store, hash-verified

47 * "/state.json" -> "" (root directory)
48 */
49export const getDirPath = (fullPath: string): string => {
50 const parent = getParentPath(fullPath);
51 // Strip leading slash, root "/" becomes ""
52 return parent === '/' ? '' : parent.replace(/^\//, '');
53};

Callers 1

toTextFileFunction · 0.90

Calls 1

getParentPathFunction · 0.85

Tested by

no test coverage detected