fs.writeFileSync(file, data[, options])


返回 undefined

🌐 Returns undefined.

如果 data 是一个普通对象,它必须拥有一个自身的(不是继承的)toString 函数属性。

🌐 If data is a plain object, it must have an own (not inherited) toString function property.

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().