Class FileLoader

java.lang.Object
All Implemented Interfaces:
Proxy

@Generated("io.github.jwharm.JavaGI") public class FileLoader extends GObject
Load a file into a GtkSourceBuffer.

A GtkSourceFileLoader object permits to load the contents of a File or a InputStream into a 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 loadAsync(int, org.gnome.gio.Cancellable, org.gnome.gio.FileProgressCallback, org.gnome.gio.AsyncReadyCallback).

Running a GtkSourceFileLoader is an undoable action for the Buffer.

After a file loading, the buffer is reset to the contents provided by the File or InputStream, so the buffer is set as “unmodified”, that is, TextBuffer.setModified(boolean) is called with false. If the contents isn't saved somewhere (for example if you load from stdin), then you should probably call TextBuffer.setModified(boolean) with true after calling loadFinish(org.gnome.gio.AsyncResult).