Gio.File.prototype.supports_thread_contexts

function supports_thread_contexts(): Boolean {
    // Gjs wrapper for g_file_supports_thread_contexts()
}
  

Checks if file supports [thread-default contexts][g-main-context-push-thread-default-context]. If this returns false, you cannot perform asynchronous operations on file in a thread that has a thread-default context.

Since 2.22

Returns

Whether or not file supports thread-default contexts.