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

Method cleanupPageAttachments

src/main/attachmentHandler.ts:168–180  ·  view source on GitHub ↗

* 清理指定页面的所有附件 * @param pageId 页面ID

(pageId: string)

Source from the content-addressed store, hash-verified

166 * @param pageId 页面ID
167 */
168 async cleanupPageAttachments(pageId: string): Promise<{ success: boolean; error?: string }> {
169 try {
170 const targetDir = path.join(this.attachmentsDir, pageId)
171 await rm(targetDir, { recursive: true, force: true })
172 return { success: true }
173 } catch (error) {
174 console.error('清理页面附件失败:', error)
175 return {
176 success: false,
177 error: error instanceof Error ? error.message : '清理页面附件失败'
178 }
179 }
180 }
181
182 /**
183 * 清理临时目录中的所有文件

Callers 1

setupAttachmentHandlersFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected