FileSaver.newWithTarget

Creates a new #GtkSourceFileSaver object with a target location.

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

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

Parameters

buffer gtksource.buffer.Buffer

the #GtkSourceBuffer to save.

file gtksource.file.File

the #GtkSourceFile.

targetLocation gio.file.File

the #GFile where to save the buffer to.

Return Value

Type: gtksource.file_saver.FileSaver

a new #GtkSourceFileSaver object.