Function writeFile

  • 写入文件

    Parameters

    • path: LooseFile
    • content: string
    • Optionalencoding: string = "utf-8"
    • Optionalmode: string = "w"

    Returns boolean

    0.1.0

    const textPath = _.createPath(_.pathDesktop.fsName, "Soil.txt");
    _.writeFile(textPath, "Hello After Effects");
    const content = _.readFile(textPath);
    alert(content);
    // 结果:桌面被写入 Soil.txt 文件,弹窗内容显示 Hello After Effects。