read_async


Description:

public async string read_async () throws Error

Read file contents asynchronously.

Always reads from disk and updates cache. Unlike GtkSourceFileBuffer, does not check file modification time - always reads fresh from disk.

Process

  1. Reads file from disk using read_async_real()

    2. Splits contents into lines array cache

    3. Sets is_loaded = true

    4. Returns file contents

Returns:

File contents as string

Exceptions:

Error

if file cannot be read