* To tree object to json * @returns {TreeJson}
()
| 610 | * @returns {TreeJson} |
| 611 | */ |
| 612 | toJSON() { |
| 613 | return { |
| 614 | name: this.#name, |
| 615 | url: this.#url, |
| 616 | path: this.#path, |
| 617 | parent: this.#parent?.url, |
| 618 | mime: this.mime, |
| 619 | size: this.size, |
| 620 | modifiedDate: this.modifiedDate, |
| 621 | isDirectory: !!this.#children, |
| 622 | }; |
| 623 | } |
| 624 | |
| 625 | /** |
| 626 | * Create a tree from json |
no outgoing calls
no test coverage detected