Gio.AppInfo.prototype.set_as_default_for_extension

function set_as_default_for_extension(extension: String): Boolean {
    // Gjs wrapper for g_app_info_set_as_default_for_extension()
}
  

Sets the application as the default handler for the given file extension.

extension

a string containing the file extension (without the dot).

Returns

true on success, false on error.