gtksource.file_saver
Module for [FileSaver] class
Types 3
Methods
FileSaverGidBuilder builder()Get builder for [gtksource.file_saver.FileSaver] Returns: New builder objectgtksource.buffer.Buffer buffer() @propertyGet `buffer` property. Returns: The #GtkSourceBuffer to save. The #GtkSourceFileSaver object has a weak reference to the buffer.gtksource.types.CompressionType compressionType() @propertyGet `compressionType` property. Returns: The compression type.void compressionType(gtksource.types.CompressionType propval) @propertySet `compressionType` property. Params: propval = The compression type.gtksource.encoding.Encoding encoding() @propertyGet `encoding` property. Returns: The file's encoding.void encoding(gtksource.encoding.Encoding propval) @propertySet `encoding` property. Params: propval = The file's encoding.gtksource.file.File file() @propertyGet `file` property. Returns: The #GtkSourceFile. The #GtkSourceFileSaver object has a weak reference to the file.void flags(gtksource.types.FileSaverFlags propval) @propertySet `flags` property. Params: propval = File saving flags.gio.file.File location() @propertyGet `location` property. Returns: The #GFile where to save the buffer. By default the location is taken from the #GtkSourceFile at construction time.gtksource.types.NewlineType newlineType() @propertyGet `newlineType` property. Returns: The newline type.void newlineType(gtksource.types.NewlineType propval) @propertySet `newlineType` property. Params: propval = The newline type.gtksource.file_saver.FileSaver newWithTarget(gtksource.buffer.Buffer buffer, gtksource.file.File file, gio.file.File targetLocation)Creates a new #GtkSourceFileSaver object with a target location. When the file saving is finished successfully, target_location is set to the file's #GtkSourceFile:location property. If an error oc...void saveAsync(int ioPriority, gio.cancellable.Cancellable cancellable = null, gio.types.FileProgressCallback progressCallback = null, gio.types.AsyncReadyCallback callback = null)Saves asynchronously the buffer into the file. See the #GAsyncResult documentation to know how to use this function.bool saveFinish(gio.async_result.AsyncResult result)Finishes a file saving started with [gtksource.file_saver.FileSaver.saveAsync].void setCompressionType(gtksource.types.CompressionType compressionType)Sets the compression type. By default the compression type is taken from the #GtkSourceFile.void setEncoding(gtksource.encoding.Encoding encoding = null)Sets the encoding. If encoding is null, the UTF-8 encoding will be set. By default the encoding is taken from the #GtkSourceFile.void setFlags(gtksource.types.FileSaverFlags flags)void setNewlineType(gtksource.types.NewlineType newlineType)Sets the newline type. By default the newline type is taken from the #GtkSourceFile.Constructors
this(gtksource.buffer.Buffer buffer, gtksource.file.File file)Creates a new #GtkSourceFileSaver object. The buffer will be saved to the #GtkSourceFile's location.Methods
T buffer(gtksource.buffer.Buffer propval)Set `buffer` property. Params: propval = The #GtkSourceBuffer to save. The #GtkSourceFileSaver object has a weak reference to the buffer. Returns: Builder instance for fluent chainingT compressionType(gtksource.types.CompressionType propval)Set `compressionType` property. Params: propval = The compression type. Returns: Builder instance for fluent chainingT encoding(gtksource.encoding.Encoding propval)Set `encoding` property. Params: propval = The file's encoding. Returns: Builder instance for fluent chainingT file(gtksource.file.File propval)Set `file` property. Params: propval = The #GtkSourceFile. The #GtkSourceFileSaver object has a weak reference to the file. Returns: Builder instance for fluent chainingT flags(gtksource.types.FileSaverFlags propval)Set `flags` property. Params: propval = File saving flags. Returns: Builder instance for fluent chainingT location(gio.file.File propval)Set `location` property. Params: propval = The #GFile where to save the buffer. By default the location is taken from the #GtkSourceFile at construction time. Returns: Builder instance for fluent c...T newlineType(gtksource.types.NewlineType propval)Set `newlineType` property. Params: propval = The newline type. Returns: Builder instance for fluent chaining