Method

IdeBufferManagerload_file_async

Declaration

void
ide_buffer_manager_load_file_async (
  IdeBufferManager* self,
  GFile* file,
  IdeBufferOpenFlags flags,
  IdeNotification* notif,
  GCancellable* cancellable,
  GAsyncReadyCallback callback,
  gpointer user_data
)

Description

Requests that file be loaded by the buffer manager. Depending on flags, this may result in a new view being displayed in a Builder workspace.

If file is NULL, then a new temporary file is created with an incrementing number to denote the document, such as “unsaved file 1”.

After completion, callback will be executed and you can receive the buffer that was loaded with ide_buffer_manager_load_file_finish().

If a buffer has already been loaded from file, the operation will complete using that existing buffer.

If a buffer is currently loading for file, the operation will complete using that existing buffer after it has completed loading.

If notif is non-NULL, it will be updated with status information while loading the document.

Parameters

file

Type: GFile

A GFile.

The argument can be NULL.
The data is owned by the caller of the method.
flags

Type: IdeBufferOpenFlags

Optional flags for loading the buffer.

notif

Type: IdeNotification

A location for an IdeNotification, or NULL.

The argument can be NULL.
The data is owned by the caller of the method.
cancellable

Type: GCancellable

A GCancellable or NULL.

The argument can be NULL.
The data is owned by the caller of the method.
callback

Type: GAsyncReadyCallback

A callback to execute upon completion of the operation.

The argument can be NULL.
user_data

Type: gpointer

Closure data for callback.

The argument can be NULL.
The data is owned by the caller of the method.