MCPcopy Create free account
hub / github.com/arctic-cli/interface / getDirectory

Function getDirectory

packages/util/src/path.ts:8–12  ·  view source on GitHub ↗
(path: string | undefined)

Source from the content-addressed store, hash-verified

6}
7
8export function getDirectory(path: string | undefined) {
9 if (!path) return ""
10 const parts = path.split("/")
11 return parts.slice(0, parts.length - 1).join("/") + "/"
12}
13
14export function getFileExtension(path: string | undefined) {
15 if (!path) return ""

Callers 3

SessionTurnFunction · 0.90
SessionReviewFunction · 0.90
renderFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected