GtkSource.FileSaver.new_with_target
Description: Reference for GtkSource.FileSaver.new_with_target

### Constructor

# GtkSource FileSavernew_with_target

#### Declaration [src]

    GtkSourceFileSaver*
    gtk_source_file_saver_new_with_target (
      GtkSourceBuffer* buffer,
      GtkSourceFile* file,
      GFile* target_location
    )

#### Description [src]

Creates a new `GtkSourceFileSaver` object with a target location.

When the file saving is finished successfully, `target_location` is set to the `file`‘s `GtkSourceFile:location` property. If an error occurs, the previous valid location is still available in `GtkSourceFile`.

This constructor is suitable for a “save as” operation, or for saving a new buffer for the first time.

#### Parameters

`buffer` | `GtkSourceBuffer`
| The `GtkSourceBuffer` to save.
| The data is owned by the caller of the function.
`file` | `GtkSourceFile`
| The `GtkSourceFile`.
| The data is owned by the caller of the function.
`target_location` | `GFile`
| The `GFile` where to save the buffer to.
| The data is owned by the caller of the function.

#### Return value

Returns: | `GtkSourceFileSaver`
| A new `GtkSourceFileSaver` object.
| The caller of the function takes ownership of the data, and is responsible for freeing it.