fs.writeFileSync(file, data[, options])
file<string> | <Buffer> | <URL> | <integer> 文件名或文件描述符data<string> | <Buffer> | <TypedArray> | <DataView> | <Object>options<Object> | <string>encoding<string> | <null> 默认值:'utf8'mode<integer> 默认值:0o666flag<string> 参见 文件系统flags支持。默认值:'w'。
返回 undefined。
🌐 Returns undefined.
mode 选项只会影响新创建的文件。详情请参见 fs.open()。
🌐 The mode option only affects the newly created file. See fs.open()
for more details.
有关详细信息,请参阅此 API 异步版本的文档:fs.writeFile()。
🌐 For detailed information, see the documentation of the asynchronous version of
this API: fs.writeFile().