Gets file descriptor.
Gets file name.
Asynchronously append the given contents to a file.
The underlying file will not be closed automatically.
It is unsafe to call appendFile()
multiple times on the same file
without waiting for the Promise
to be resolved (or rejected).
Asynchronously append the given contents to a file.
The underlying file will not be closed automatically.
It is unsafe to call appendFile()
multiple times on the same file
without waiting for the Promise
to be resolved (or rejected).
Optional
encoding: EncodingAsynchronously reads data from the file.
The buffer that the data will be written to.
The offset in the buffer at which to start writing.
The number of bytes to read.
The offset from the beginning of the file from which data
should be read. If null
, data will be read from the
current position.
Asynchronously reads the entire contents of a file.
The underlying file will not be closed automatically.
Asynchronously reads the entire contents of a file.
The underlying file will not be closed automatically.
Asynchronously writes the given data to this file.
The data to write.
Optional
offset: numberThe part of the buffer to be written. If not supplied,
defaults to 0
.
Optional
length: numberThe number of bytes to write. If not supplied, defaults to
buffer.length - offset
.
Optional
position: numberThe offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
Asynchronously writes the given contents to a file, replacing any old contents.
The underlying file will not be closed automatically.
It is unsafe to call writeFile()
multiple times on the same file
without waiting for the Promise
to be resolved (or rejected).
Asynchronously writes the given contents to a file, replacing any old contents.
The underlying file will not be closed automatically.
It is unsafe to call writeFile()
multiple times on the same file
without waiting for the Promise
to be resolved (or rejected).
Optional
encoding: EncodingStatic
openOptional
mode: null | string | number
A
FileHandle
object is a wrapper for a numeric file descriptor. Instances ofFileHandle
are distinct from numeric file descriptors in that they provide an object oriented API for working with files.