(node: FileNode)
| 192 | |
| 193 | // 辅助函数:将树节点转换为文件 |
| 194 | export function nodeToFile(node: FileNode): File { |
| 195 | const file = new File([node.content || ''], node.name); |
| 196 | Object.defineProperty(file, 'webkitRelativePath', { |
| 197 | value: node.path, |
| 198 | writable: false |
| 199 | }); |
| 200 | return file; |
| 201 | } |
| 202 | |
| 203 | // 辅助函数:复制文本到剪贴板 |
| 204 | export function copyToClipboard(text: string): Promise<boolean> { |
nothing calls this directly
no outgoing calls
no test coverage detected