fs.mkdtempSync(prefix[, options])
prefix<string> | <Buffer> | <URL>options<string> | <Object>encoding<string> 默认:'utf8'
- 返回:<string> | <Buffer>
返回创建的目录路径。如果 encoding 是 'buffer',那么结果目录路径将作为 <Buffer> 返回。否则,将使用指定的编码作为 <string> 返回路径。
🌐 Returns the created directory path. If encoding is 'buffer', then the
resulting directory path is returned as a <Buffer>. Otherwise, the path
is returned as a <string> using the specified encoding.
有关详细信息,请参阅此 API 异步版本的文档:fs.mkdtemp()。
🌐 For detailed information, see the documentation of the asynchronous version of
this API: fs.mkdtemp().
可选的 options 参数可以是指定编码的字符串,或者是一个具有 encoding 属性的对象,用于指定要使用的字符编码。
🌐 The optional options argument can be a string specifying an encoding, or an
object with an encoding property specifying the character encoding to use.