* Reads directory contents asynchronously. * @param {string} dirPath The directory path * @param {object|Function} [options] Options or callback * @param {Function} [callback] Callback (err, entries)
(dirPath, options, callback)
| 712 | * @param {Function} [callback] Callback (err, entries) |
| 713 | */ |
| 714 | readdir(dirPath, options, callback) { |
| 715 | if (typeof options === 'function') { |
| 716 | callback = options; |
| 717 | options = undefined; |
| 718 | } |
| 719 | |
| 720 | this[kProvider].readdir(this.#toProviderPath(dirPath), options) |
| 721 | .then((entries) => callback(null, entries), (err) => callback(err)); |
| 722 | } |
| 723 | |
| 724 | /** |
| 725 | * Gets the real path asynchronously. |
no test coverage detected