MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / Home

Class Home

tools/xsbug/main.js:97–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95} from "Test262Pane";
96
97class 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
131const conversations = [
132 { visible:true, id:"WOW", tint:0 },

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected