fs Promises API


API 可通过 require('fs').promises 访问。

The fs.promises API provides an alternative set of asynchronous file system methods that return Promise objects rather than using callbacks. The API is accessible via require('fs').promises.