### Method

# Ide UnsavedFiles to_array

#### Declaration

    GPtrArray*
    ide_unsaved_files_to_array (
      IdeUnsavedFiles* self
    )

#### Description

This retrieves all of the unsaved file buffers known to the context. These are handy if you need to pass modified state to parsers such as clang.

Call `g_ptr_array_unref()` on the resulting `GPtrArray` when no longer in use.

If you would like to hold onto an unsaved file instance, call `ide_unsaved_file_ref()` to increment its reference count.

Available since: | 3.32

#### Return value

Returns: | An array of `IdeUnsavedFile*`
| A `GPtrArray` containing `IdeUnsavedFile` elements.
| The caller of the method takes ownership of the data, and is responsible for freeing it.