Gio.Settings.sync

function sync(): void {
    // Gjs wrapper for g_settings_sync()
}
  

Ensures that all pending operations for the given are complete for the default backend.

Writes made to a Gio.Settings are handled asynchronously. For this reason, it is very unlikely that the changes have it to disk by the time Gio.Settings.set returns.

This call will block until all of the writes have made it to the backend. Since the mainloop is not running, no change notifications will be dispatched during this call (but some may be queued by the time the call is done).