* Restore from snapshot
(snapshot: FileSystemSnapshot)
| 448 | * Restore from snapshot |
| 449 | */ |
| 450 | fromSnapshot(snapshot: FileSystemSnapshot): void { |
| 451 | this.nodes = new Map(snapshot.nodes); |
| 452 | this.pathIndex = new Map(snapshot.pathIndex); |
| 453 | this.rootId = snapshot.rootId; |
| 454 | this.emit('store_reset'); |
| 455 | } |
| 456 | |
| 457 | /** |
| 458 | * Export as JSON |