FileHandle object is a wrapper for a numeric file descriptor.
FileHandle are distinct from numeric file descriptors
in that they provide an object oriented API for working with files.
FileHandle is not closed using the
filehandle.close() method, it might automatically close the file descriptor
and will emit a process warning, thereby helping to prevent memory leaks.
Please do not rely on this behavior because it is unreliable and
the file may not be closed. Instead, always explicitly close
Node.js may change this behavior in the future.
Instances of the
FileHandle object are created internally by the
Unlike the callback-based API (
so on), a numeric file descriptor is not used by the promise-based API. Instead,
the promise-based API uses the
FileHandle class in order to help avoid
accidental leaking of unclosed file descriptors after a
Promise is resolved or