Gio.File.prototype.load_contents_async
function load_contents_async(cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback): void { // Gjs wrapper for g_file_load_contents_async() }
Starts an asynchronous load of the file's contents.
For more details, see Gio.File.prototype.load_contents which is the synchronous version of this call.
When the load operation has completed, callback will be called with @user data. To finish the operation, call Gio.File.prototype.load_contents_finish with the Gio.AsyncResult returned by the callback.
If cancellable is not null, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error Gio.IOErrorEnum.cancelled will be returned.
- cancellable
optional Gio.Cancellable object, null to ignore
- callback
a Gio.AsyncReadyCallback to call when the request is satisfied