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

Function removeFolder

frontend/src/views/sql-editor/Sheet/context.ts:469–480  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

467 return newPath;
468 },
469 removeFolder(path) {
470 const current = useSheetContextStore.getState().viewStates[view].folders;
471 const next = current.filter(
472 (value) =>
473 !(
474 value === path ||
475 isSubFolder({ parent: path, path: value, dig: true })
476 )
477 );
478 useSheetContextStore.getState().setViewFolders(view, next);
479 persistViewFolders(view, next);
480 },
481 moveFolder(from, to) {
482 const fromPath = ensureFolderPath(view, from);
483 const toPath = ensureFolderPath(view, to);

Callers

nothing calls this directly

Calls 2

isSubFolderFunction · 0.90
persistViewFoldersFunction · 0.85

Tested by

no test coverage detected