* Refresh a loaded folder in this tree or one of its expanded child trees. * @param {string} url * @param {(a: string, b: string) => boolean} [isSameUrl] * @returns {Promise }
(url, isSameUrl = (a, b) => a === b)
| 342 | * @returns {Promise<boolean>} |
| 343 | */ |
| 344 | async refreshFolder(url, isSameUrl = (a, b) => a === b) { |
| 345 | if (this.currentUrl && isSameUrl(this.currentUrl, url)) { |
| 346 | await this.refresh(); |
| 347 | return true; |
| 348 | } |
| 349 | |
| 350 | for (const childTree of this.childTrees.values()) { |
| 351 | if (await childTree.refreshFolder(url, isSameUrl)) { |
| 352 | return true; |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | return false; |
| 357 | } |
| 358 | |
| 359 | /** |
| 360 | * Destroy all expanded child trees and clear their references. |
no test coverage detected