gtksource.file
Module for [File] class
Types 3
classFile : gobject.object.ObjectWrap
On-disk representation of a class@Buffer.
A [gtksource.file.File] object is the on-disk representation of a class@Buffer. With a [gtksource.file.File], you can create and configure a class@FileLoader and class@FileSaver which take by default the values of the [gtksource.file.File] properties (except for the file loader which auto-detect some properties). On a successful load or save operation, the [gtksource.file.File] properties are updated. If an operation fails, the [gtksource.file.File] properties have still the previous valid values.
Methods
FileGidBuilder builder()Get builder for [gtksource.file.File] Returns: New builder objectgtksource.types.CompressionType compressionType() @propertyGet `compressionType` property. Returns: The compression type.gtksource.encoding.Encoding encoding() @propertyGet `encoding` property. Returns: The character encoding, initially null. After a successful file loading or saving operation, the encoding is non-null.void location(gio.file.File propval) @propertySet `location` property. Params: propval = The location.gtksource.types.NewlineType newlineType() @propertyGet `newlineType` property. Returns: The line ending type.bool readOnly() @propertyGet `readOnly` property. Returns: Whether the file is read-only or not. The value of this property is not updated automatically (there is no file monitors).void 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.gtksource.encoding.Encoding getEncoding()The encoding is initially null. After a successful file loading or saving operation, the encoding is non-null. Returns: the character encoding.bool isDeleted()Returns whether the file has been deleted. If the `propertyFile:location` is null, returns false.bool isExternallyModified()Returns whether the file is externally modified. If the `propertyFile:location` is null, returns false.bool isLocal()Returns whether the file is local. If the `propertyFile:location` is null, returns false. Returns: whether the file is local.bool isReadonly()Returns whether the file is read-only. If the `propertyFile:location` is null, returns false.void setLocation(gio.file.File location = null)Sets the location.Methods
T location(gio.file.File propval)Set `location` property. Params: propval = The location. Returns: Builder instance for fluent chaining