MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / setClipBoard

Function setClipBoard

frontend/src/hooks/useFileManager.ts:367–383  ·  view source on GitHub ↗
(type: "copy" | "move", file?: string)

Source from the content-addressed store, hash-verified

365 };
366
367 const setClipBoard = (type: "copy" | "move", file?: string) => {
368 if (file) {
369 clipboard.value = {
370 type,
371 value: [currentPath.value + file]
372 };
373 } else {
374 if (!selectionData.value || selectionData.value.length === 0)
375 return reportErrorMsg(t("TXT_CODE_b152cd75"));
376 clipboard.value = {
377 type,
378 value: selectionData.value?.map((e) => currentPath.value + e.name)
379 };
380 }
381 message.success(t("TXT_CODE_25cb04bb"));
382 clearSelected();
383 };
384
385 const paste = async () => {
386 if (!clipboard?.value?.type || !clipboard.value.value)

Callers

nothing calls this directly

Calls 2

reportErrorMsgFunction · 0.90
clearSelectedFunction · 0.85

Tested by

no test coverage detected