writeFile 写入文件(Electron)
writeFile
类型: MethodDeclaration
定义位置: data.ts
描述
写入文件(Electron)
参数 filePath
: 文件路径
参数 content
: 数据内容
返回值:等待操作结束
参数
参数名 | 类型 | 描述 | 默认值 |
---|---|---|---|
filePath | string | - | - |
content | string | - | - |
返回值
类型: Promise<void>
等待操作结束
源代码
位置: 第 650 行
public async writeFile(filePath: string, content: string): Promise<void> {
return require('electron').ipcRenderer.invoke('write-file', filePath, content)
}
文档生成时间:2025/7/7 12:07:06