MCPcopy Create free account
hub / github.com/esengine/esengine / handleDeleteConfirm

Function handleDeleteConfirm

packages/editor-app/src/components/FileTree.tsx:489–506  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

487 };
488
489 const handleDeleteConfirm = async () => {
490 if (!deleteDialog) return;
491
492 const node = deleteDialog.node;
493 setDeleteDialog(null);
494
495 try {
496 if (node.type === 'folder') {
497 await TauriAPI.deleteFolder(node.path);
498 } else {
499 await TauriAPI.deleteFile(node.path);
500 }
501 await refreshTree();
502 } catch (error) {
503 console.error('Failed to delete:', error);
504 alert(`${t('fileTree.deleteFailed')}: ${error}`);
505 }
506 };
507
508 const handleCreateFileClick = (parentPath: string) => {
509 setContextMenu(null);

Callers

nothing calls this directly

Calls 4

refreshTreeFunction · 0.85
deleteFolderMethod · 0.80
deleteFileMethod · 0.65
errorMethod · 0.45

Tested by

no test coverage detected