NodeFilesystemPromiseAPI
Node API: Filesystem Promises (Module)
Defines the module-level API for the Node fs/promises built-in module, which is the combination of FilesystemPromiseAPI and WritableFilesystemPromiseAPI.
See also
for read methods which produce promises.
for write methods which produce promises.
Functions
Tests a user's permissions for the file or directory specified by path. The mode argument is an optional integer that specifies the accessibility checks to be performed. mode should be either the value fs.constants.F_OK or a mask consisting of the bitwise OR of any of fs.constants.R_OK,fs.constants.W_OK, and fs.constants.X_OK (e.g. fs.constants.W_OK | fs.constants.R_OK).
Tests a user's permissions for the file or directory specified by path. The mode argument is an optional integer that specifies the accessibility checks to be performed. mode should be either the value fs.constants.F_OK or a mask consisting of the bitwise OR of any of fs.constants.R_OK,fs.constants.W_OK, and fs.constants.X_OK (e.g. fs.constants.W_OK | fs.constants.R_OK).
Asynchronously copies a file.
Asynchronously copies a file using host-side types.
Asynchronously creates a directory.
Reads the contents of a file at the specified path; provides the results or an error to the callback. This variant accepts a polyglot Value.
Asynchronously writes data to a file, replacing the file if it already exists. data can be a string, a buffer, an AsyncIterable, or an Iterable object. The promise is fulfilled with no arguments upon success.