| 95 | } from "Test262Pane"; |
| 96 | |
| 97 | class Home { |
| 98 | constructor(path) { |
| 99 | this.depth = 0; |
| 100 | this.expanded = true; |
| 101 | this.items = []; |
| 102 | this.name = system.getPathName(path); |
| 103 | this.path = path; |
| 104 | this.initialize(); |
| 105 | } |
| 106 | close() { |
| 107 | if (this.directoryNotifier) |
| 108 | this.directoryNotifier.close(); |
| 109 | } |
| 110 | initialize() { |
| 111 | let directory = system.getPathDirectory(this.path); |
| 112 | this.directoryNotifier = new system.DirectoryNotifier(directory, path => { |
| 113 | this.onDirectoryChanged(path); |
| 114 | }); |
| 115 | } |
| 116 | onDirectoryChanged(path) { |
| 117 | if (!system.fileExists(this.path)) |
| 118 | model.doCloseDirectory(this.path); |
| 119 | } |
| 120 | toJSON() { |
| 121 | return { |
| 122 | path: this.path, |
| 123 | name: this.name, |
| 124 | expanded: this.expanded, |
| 125 | depth: this.depth, |
| 126 | items: this.items, |
| 127 | }; |
| 128 | } |
| 129 | }; |
| 130 | |
| 131 | const conversations = [ |
| 132 | { visible:true, id:"WOW", tint:0 }, |
nothing calls this directly
no outgoing calls
no test coverage detected