* Initialize root node
()
| 50 | * Initialize root node |
| 51 | */ |
| 52 | private initRoot(): void { |
| 53 | const rootNode: FileNode = { |
| 54 | id: this.rootId, |
| 55 | name: '', |
| 56 | path: '/', |
| 57 | type: 'folder', |
| 58 | parentId: null, |
| 59 | children: [], |
| 60 | metadata: { |
| 61 | createdAt: Date.now(), |
| 62 | updatedAt: Date.now(), |
| 63 | }, |
| 64 | }; |
| 65 | this.nodes.set(this.rootId, rootNode); |
| 66 | this.pathIndex.set('/', this.rootId); |
| 67 | } |
| 68 | |
| 69 | // ============ Event System ============ |
| 70 |
no outgoing calls
no test coverage detected