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

Method onOpenFile

tools/xsbug/main.js:298–310  ·  view source on GitHub ↗
(application, path)

Source from the content-addressed store, hash-verified

296 application.invalidateMenus();
297 }
298 onOpenFile(application, path) {
299 if (this.onOpenFileList)
300 this.onOpenFileList.push(path);
301 else {
302 const info = system.getFileInfo(path);
303 if (info) {
304 if (info.directory)
305 this.doOpenDirectoryCallback(application, path);
306 else
307 this.doOpenFileCallback(application, path);
308 }
309 }
310 }
311 onOpenFileCallback(application) {
312 const onOpenFileList = this.onOpenFileList;
313 delete this.onOpenFileList;

Callers 1

onOpenFileCallbackMethod · 0.95

Calls 3

doOpenFileCallbackMethod · 0.95
pushMethod · 0.45

Tested by

no test coverage detected