get_file


Description:

[ Version ( since = "3.14" ) ]
public unowned SourceFile get_file ()

Gets the associated SourceFile.

You should use it only for reading purposes, not for creating a SourceFileLoader or SourceFileSaver, because gedit does some extra work when loading or saving a file and maintains an internal state. If you use in a plugin a file loader or saver on the returned SourceFile, the internal state of gedit won't be updated.

If you want to save the Document to a secondary file, you can create a new SourceFile and use a SourceFileSaver.

Parameters:

this

a Document.

Returns:

the associated SourceFile.