FileSaver

open class FileSaver(val gtksourceFileSaverPointer: <Error class: unknown class><<Error class: unknown class>>)

Save a class@Buffer into a file.

A GtkSourceFileSaver object permits to save a class@Buffer into a iface@Gio.File.

A file saver should be used only for one save operation, including errors handling. If an error occurs, you can reconfigure the saver and relaunch the operation with method@FileSaver.save_async.

Skipped during bindings generation

  • method encoding: Property TypeInfo of getter and setter do not match

Constructors

Link copied to clipboard
constructor(buffer: Buffer, file: File)

Creates a new #GtkSourceFileSaver object. The @buffer will be saved to the class@File's location.

constructor(buffer: Buffer, file: File, targetLocation: <Error class: unknown class>)

Creates a new #GtkSourceFileSaver object with a target location.

constructor(gtksourceFileSaverPointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val buffer: Buffer

The #GtkSourceBuffer to save. The #GtkSourceFileSaver object has a weak reference to the buffer.

Link copied to clipboard

The compression type.

Link copied to clipboard
open val file: File

The #GtkSourceFile. The #GtkSourceFileSaver object has a weak reference to the file.

Link copied to clipboard

File saving flags.

Link copied to clipboard
val gtksourceFileSaverPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val location: <Error class: unknown class>

The #GFile where to save the buffer. By default the location is taken from the #GtkSourceFile at construction time.

Link copied to clipboard

The newline type.

Functions

Link copied to clipboard
open fun getEncoding(): Encoding
Link copied to clipboard
open fun saveAsync(ioPriority: <Error class: unknown class>, cancellable: <Error class: unknown class>? = null, progressCallback: <Error class: unknown class>?, callback: <Error class: unknown class>?)

Saves asynchronously the buffer into the file.

Link copied to clipboard
open fun saveFinish(result: <Error class: unknown class>): <Error class: unknown class><Boolean>

Finishes a file saving started with method@FileSaver.save_async.

Link copied to clipboard
open fun setEncoding(encoding: Encoding? = null)

Sets the encoding. If @encoding is null, the UTF-8 encoding will be set.