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

Function resetName

frontend/src/hooks/useFileManager.ts:411–429  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

409 };
410
411 const resetName = async (file: string) => {
412 const newname = await openDialog(t("TXT_CODE_c83551f5"), t("TXT_CODE_a5830778"), file);
413 try {
414 const { execute } = moveFileApi();
415 await execute({
416 params: {
417 uuid: instanceId || "",
418 daemonId: daemonId || ""
419 },
420 data: {
421 targets: [[currentPath.value + file, currentPath.value + newname]]
422 }
423 });
424 message.success(t("TXT_CODE_5b990e2e"));
425 await getFileList();
426 } catch (error: any) {
427 return error.message;
428 }
429 };
430
431 const deleteFile = async (file?: string) => {
432 const { execute } = deleteFileApi();

Callers

nothing calls this directly

Calls 3

executeFunction · 0.85
getFileListFunction · 0.85
openDialogFunction · 0.70

Tested by

no test coverage detected