FileLoader
Load a file into a GtkSourceBuffer.
A GtkSourceFileLoader
object permits to load the contents of a iface@Gio.File or a class@Gio.InputStream into a class@Buffer.
A file loader should be used only for one load operation, including errors handling. If an error occurs, you can reconfigure the loader and relaunch the operation with method@FileLoader.load_async.
Running a GtkSourceFileLoader
is an undoable action for the class@Buffer.
After a file loading, the buffer is reset to the contents provided by the iface@Gio.File or class@Gio.InputStream, so the buffer is set as “unmodified”, that is, method@Gtk.TextBuffer.set_modified is called with false. If the contents isn't saved somewhere (for example if you load from stdin), then you should probably call method@Gtk.TextBuffer.set_modified with true after calling method@FileLoader.load_finish.
Constructors
Properties
Functions
Loads asynchronously the file or input stream contents into the class@Buffer.
Finishes a file loading started with method@FileLoader.load_async.
Sets the candidate encodings for the file loading.