GtkSource.File
Description: Reference for GtkSource.File

### 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.

#### Hierarchy

#### Ancestors

- GObject

#### Constructors

###### gtk_source_file_new

No description available.

#### 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_compression_type

No description available.

###### 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_get_location

No description available.

###### gtk_source_file_get_newline_type

No description available.

###### 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_location

Sets the location.

###### gtk_source_file_set_mount_operation_factory

Sets a `GtkSourceMountOperationFactory` function that will be called when a `GMountOperation` must be created.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### GtkSource.File:compression-type

The compression type.

###### GtkSource.File:encoding

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

###### GtkSource.File:location

The location.

###### GtkSource.File:newline-type

The line ending type.

###### 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.

#### Class structure

    struct GtkSourceFileClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.