MCPcopy Create free account
hub / github.com/bytebase/bytebase / getPathesForWorksheet

Function getPathesForWorksheet

frontend/src/views/sql-editor/Sheet/context.ts:533–545  ·  view source on GitHub ↗
(
  view: SheetViewMode,
  worksheet: { folders: string[] }
)

Source from the content-addressed store, hash-verified

531};
532
533const getPathesForWorksheet = (
534 view: SheetViewMode,
535 worksheet: { folders: string[] }
536): string[] => {
537 const folderContext = getFolderContext(view);
538 const pathes = [folderContext.rootPath];
539 let currentPath = folderContext.rootPath;
540 for (const folder of worksheet.folders) {
541 currentPath = folderContext.ensureFolderPath(`${currentPath}/${folder}`);
542 pathes.push(currentPath);
543 }
544 return pathes;
545};
546
547const getPwdForWorksheet = (
548 view: SheetViewMode,

Callers 2

rebuildTreeImplFunction · 0.85
buildViewContextFunction · 0.85

Calls 1

getFolderContextFunction · 0.85

Tested by

no test coverage detected