gtksource.file

Module for [File] class

Types 3

On-disk representation of a gtksource.buffer.Buffer.

A gtksource.file.File object is the on-disk representation of a gtksource.buffer.Buffer. With a gtksource.file.File, you can create and configure a gtksource.file_loader.FileLoader and gtksource.file_saver.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
GType _getGType() static nothrow
GType _gType() @property nothrow
File self() nothrowReturns `this`, for use in `with` statements.
FileGidBuilder builder() static nothrowGet builder for [gtksource.file.File] Returns: New builder object
gtksource.types.CompressionType compressionType() @property nothrowGet `compressionType` property. Returns: The compression type.
gtksource.encoding.Encoding encoding() @property nothrowGet `encoding` property. Returns: The character encoding, initially null. After a successful file loading or saving operation, the encoding is non-null.
gio.file.File location() @property nothrowGet `location` property. Returns: The location.
void location(gio.file.File propval) @property nothrowSet `location` property. Params: propval = The location.
gtksource.types.NewlineType newlineType() @property nothrowGet `newlineType` property. Returns: The line ending type.
bool readOnly() @property nothrowGet `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() nothrowChecks 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() nothrowThe encoding is initially null. After a successful file loading or saving operation, the encoding is non-null. Returns: the character encoding.
bool isDeleted() nothrowReturns whether the file has been deleted. If the [gtksource.file.File.location] is null, returns false.
bool isExternallyModified() nothrowReturns whether the file is externally modified. If the [gtksource.file.File.location] is null, returns false.
bool isLocal() nothrowReturns whether the file is local. If the [gtksource.file.File.location] is null, returns false. Returns: whether the file is local.
bool isReadonly() nothrowReturns whether the file is read-only. If the [gtksource.file.File.location] is null, returns false.
void setLocation(gio.file.File location = null) nothrowSets the location.
Constructors
this(void * ptr, Flag!"Take" take)

Fluent builder implementation template for gtksource.file.File

Methods
T location(gio.file.File propval) nothrowSet `location` property. Params: propval = The location. Returns: Builder instance for fluent chaining

Fluent builder for gtksource.file.File

Methods
File build() nothrowCreate object from builder. Returns: New object