File

open class File(pointer: <Error class: unknown class><<Error class: unknown class>>)

On-disk representation of a class@Buffer.

A GtkSourceFile object is the on-disk representation of a class@Buffer. With a GtkSourceFile, you can create and configure a class@FileLoader and class@FileSaver which take by default the values of the GtkSourceFile properties (except for the file loader which auto-detect some properties). On a successful load or save operation, the GtkSourceFile properties are updated. If an operation fails, the GtkSourceFile properties have still the previous valid values.

Skipped during bindings generation

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

  • method read-only: Property has no getter nor setter

Constructors

Link copied to clipboard
constructor()
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The compression type.

Link copied to clipboard
open val encoding: Encoding

The character encoding, initially null. After a successful file loading or saving operation, the encoding is non-null.

Link copied to clipboard
val gtksourceFilePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard

The line ending type.

Functions

Link copied to clipboard
open fun checkFileOnDisk()

Checks synchronously the file on disk, to know whether the file is externally modified, or has been deleted, and whether the file is read-only.

Link copied to clipboard
Link copied to clipboard
open fun getEncoding(): Encoding

The encoding is initially null. After a successful file loading or saving operation, the encoding is non-null.

Link copied to clipboard
open fun getLocation(): <Error class: unknown class>
Link copied to clipboard
Link copied to clipboard
open fun isDeleted(): Boolean

Returns whether the file has been deleted. If the property@File:location is null, returns false.

Link copied to clipboard

Returns whether the file is externally modified. If the property@File:location is null, returns false.

Link copied to clipboard
open fun isLocal(): Boolean

Returns whether the file is local. If the property@File:location is null, returns false.

Link copied to clipboard
open fun isReadonly(): Boolean

Returns whether the file is read-only. If the property@File:location is null, returns false.

Link copied to clipboard
open fun setLocation(location: <Error class: unknown class>? = null)

Sets the location.