MCPcopy Create free account
hub / github.com/experdot/pointer / deleteAttachment

Method deleteAttachment

src/main/attachmentHandler.ts:75–86  ·  view source on GitHub ↗

* 删除附件 * @param localPath 相对路径

(localPath: string)

Source from the content-addressed store, hash-verified

73 * @param localPath 相对路径
74 */
75 async deleteAttachment(localPath: string): Promise<{ success: boolean; error?: string }> {
76 try {
77 await deleteAttachmentFile(localPath)
78 return { success: true }
79 } catch (error) {
80 console.error('删除附件失败:', error)
81 return {
82 success: false,
83 error: error instanceof Error ? error.message : '删除附件失败'
84 }
85 }
86 }
87
88 /**
89 * 移动附件(从temp到正式目录)

Callers 1

setupAttachmentHandlersFunction · 0.80

Calls 1

deleteAttachmentFileFunction · 0.90

Tested by

no test coverage detected