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

Method deleteAttachment

src/main/attachmentHandler.ts:91–103  ·  view source on GitHub ↗

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

(localPath: string)

Source from the content-addressed store, hash-verified

89 * @param localPath 相对路径
90 */
91 async deleteAttachment(localPath: string): Promise<{ success: boolean; error?: string }> {
92 try {
93 const fullPath = path.join(this.attachmentsDir, localPath)
94 await unlink(fullPath)
95 return { success: true }
96 } catch (error) {
97 console.error('删除附件失败:', error)
98 return {
99 success: false,
100 error: error instanceof Error ? error.message : '删除附件失败'
101 }
102 }
103 }
104
105 /**
106 * 移动附件(从temp到正式目录)

Callers 1

setupAttachmentHandlersFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected