SourceFileSaver.with_target


Description:

[ CCode ( has_construct_function = false ) ]
[ Version ( since = "3.14" ) ]
public SourceFileSaver.with_target (SourceBuffer buffer, SourceFile file, File target_location)

Creates a new SourceFileSaver object with a target location.

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

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

Parameters:

buffer

the SourceBuffer to save.

file

the SourceFile.

target_location

the File where to save the buffer to.

Returns:

a new SourceFileSaver object.