[Macro] Get all open files

Hi,
there is a function to get a list of all open files in javascript macros?
Thank you.

1 Like

Sure is! ko.views.manager.getAllViews()

Example usage:

var filePaths = [];
var editorViews = ko.views.manager.getAllViews();
for (let editorView of editorViews)
{
    filePaths.push(editorView.koDoc.file.path);
}
alert(filePaths.join(", "));
1 Like

Nice! Thanks!