Gio.Application.prototype.open

function open(files: Array(Gio.File), hint: String): void {
    // Gjs wrapper for g_application_open()
}
  

Opens the given files.

In essence, this results in the Gio.Application::open signal being emitted in the primary instance.

n_files must be greater than zero.

hint is simply passed through to the ::open signal. It is intended to be used by applications that have multiple modes for opening files (eg: "view" vs "edit", etc). Unless you have a need for this functionality, you should use "".

The application must be registered before calling this function and it must have the Gio.ApplicationFlags.handles_open flag set.

Since 2.28

files

an array of #GFiles to open

hint

a hint (or ""), but never null