new buffer.File(sources, fileName[, options])
-
sources
<string[]> | <ArrayBuffer[]> | <TypedArray[]> | <DataView[]> | <Blob[]> | <File[]> 将存储在File
中的字符串数组、<ArrayBuffer>、<TypedArray>、<DataView>、<File> 或 <Blob> 对象,或此类对象的任意组合。¥
sources
<string[]> | <ArrayBuffer[]> | <TypedArray[]> | <DataView[]> | <Blob[]> | <File[]> An array of string, <ArrayBuffer>, <TypedArray>, <DataView>, <File>, or <Blob> objects, or any mix of such objects, that will be stored within theFile
. -
fileName
<string> 文件名。¥
fileName
<string> The name of the file. -
options
<Object>-
endings
<string>'transparent'
或'native'
之一。设置为'native'
时,字符串源部分中的行结束将转换为require('node:os').EOL
指定的平台原生行结束。¥
endings
<string> One of either'transparent'
or'native'
. When set to'native'
, line endings in string source parts will be converted to the platform native line-ending as specified byrequire('node:os').EOL
. -
type
<string> 文件内容类型。¥
type
<string> The File content-type. -
lastModified
<number> 文件的最后修改日期。默认值:Date.now()
。¥
lastModified
<number> The last modified date of the file. Default:Date.now()
.
-