Write data to a file, replacing the file if it already exists and creating any intermediate directories if they don't already exist. Thin wrapper around node's native fs methods.
- file path
- file system
- View more
Gives full control over when ES6 promises are resolved by providing an implementation of Promise with behavior controlled by .resolve(result) and .reject(error) methods. Intended for use in unit tests.