Class
GtkSourceFile
Description [src]
class GtkSource.File : GObject.Object
{
/* No available fields */
}
On-disk representation of a GtkSourceBuffer
.
A GtkSourceFile
object is the on-disk representation of a GtkSourceBuffer
.
With a GtkSourceFile
, you can create and configure a GtkSourceFileLoader
and GtkSourceFileSaver
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.
Instance methods
gtk_source_file_check_file_on_disk
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.
gtk_source_file_get_encoding
The encoding is initially NULL
. After a successful file loading or saving
operation, the encoding is non-NULL
.
gtk_source_file_is_deleted
Returns whether the file has been deleted. If the
GtkSourceFile:location
is NULL
, returns FALSE
.
gtk_source_file_is_externally_modified
Returns whether the file is externally modified. If the
GtkSourceFile:location
is NULL
, returns FALSE
.
gtk_source_file_is_local
Returns whether the file is local. If the GtkSourceFile:location
is NULL
,
returns FALSE
.
gtk_source_file_is_readonly
Returns whether the file is read-only. If the
GtkSourceFile:location
is NULL
, returns FALSE
.
gtk_source_file_set_mount_operation_factory
Sets a GtkSourceMountOperationFactory
function that will be called when a
GMountOperation
must be created.
Properties
GtkSource.File:encoding
The character encoding, initially NULL
. After a successful file
loading or saving operation, the encoding is non-NULL
.
GtkSource.File:read-only
Whether the file is read-only or not. The value of this property is not updated automatically (there is no file monitors).
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.