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

Function buildFolderPath

apps/sim/lib/workflows/operations/import-export.ts:206–222  ·  view source on GitHub ↗
(
  folderId: string | null | undefined,
  foldersMap: Map<string, FolderExportData>
)

Source from the content-addressed store, hash-verified

204}
205
206function buildFolderPath(
207 folderId: string | null | undefined,
208 foldersMap: Map<string, FolderExportData>
209): string {
210 if (!folderId) return ''
211
212 const path: string[] = []
213 let currentId: string | null = folderId
214
215 while (currentId && foldersMap.has(currentId)) {
216 const folder: FolderExportData = foldersMap.get(currentId)!
217 path.unshift(sanitizePathSegment(folder.name))
218 currentId = folder.parentId
219 }
220
221 return path.join('/')
222}
223
224export async function exportWorkspaceToZip(
225 workspaceName: string,

Callers 2

exportWorkspaceToZipFunction · 0.85
exportFolderToZipFunction · 0.85

Calls 4

sanitizePathSegmentFunction · 0.85
unshiftMethod · 0.80
joinMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected