C
File
History
Added in: v19.2.0, v18.13.0
v19.2.0, v18.13.0
Introduced in: v0.1.90
v0.1.90
Makes File instances cloneable.
v23.0.0
No longer experimental.
v20.0.0
class File extends Blob
A File provides information about files.
new buffer.File(sources, fileName, options?): buffer.File
Attributes
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 the File.fileName:
stringThe name of the file.
options:
Objectendings:
stringOne 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 by require('node:os').EOL.type:
stringThe File content-type.
lastModified?:
numberThe last modified date of the file.
Default:
Date.now().Type:
stringThe name of the File.
Type:
numberThe last modified date of the File.