* Delete a directory without throwing an error if it is already deleted. * * @param {string} filepath - The path to the directory. * @param {Object} [opts] - Options for deleting the directory. * @returns {Promise }
(filepath, opts)
| 205 | * @returns {Promise<void>} |
| 206 | */ |
| 207 | async rmdir(filepath, opts) { |
| 208 | try { |
| 209 | if (opts && opts.recursive) { |
| 210 | await this._rm(filepath, opts) |
| 211 | } else { |
| 212 | await this._rmdir(filepath) |
| 213 | } |
| 214 | } catch (err) { |
| 215 | if (err.code !== 'ENOENT') throw err |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | /** |
| 220 | * Read a directory without throwing an error is the directory doesn't exist |
no outgoing calls
no test coverage detected