MCPcopy Index your code
hub / github.com/simstudioai/sim / getFolderPath

Function getFolderPath

apps/sim/lib/folders/tree.ts:45–59  ·  view source on GitHub ↗
(
  folders: Record<string, WorkflowFolder>,
  folderId: string
)

Source from the content-addressed store, hash-verified

43}
44
45export function getFolderPath(
46 folders: Record<string, WorkflowFolder>,
47 folderId: string
48): WorkflowFolder[] {
49 const path: WorkflowFolder[] = []
50 let currentId: string | null = folderId
51
52 while (currentId && folders[currentId]) {
53 const folder: WorkflowFolder = folders[currentId]
54 path.unshift(folder)
55 currentId = folder.parentId
56 }
57
58 return path
59}

Callers 3

sidebar.tsxFile · 0.90
workflow-list.tsxFile · 0.90
useDragDropFunction · 0.90

Calls 1

unshiftMethod · 0.80

Tested by

no test coverage detected