GtkSource.File¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
|||
r |
|||
r/w/c |
|||
r |
|||
r |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class GtkSource.File(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
a new
GtkSource.File
object.- Return type:
New in version 3.14.
- 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.
GtkSource.File
doesn’t create aGio.FileMonitor
to track those properties, so this function needs to be called instead. Creating lots ofGio.FileMonitor
's would take lots of resources.Since this function is synchronous, it is advised to call it only on local files. See
GtkSource.File.is_local
().New in version 3.18.
- get_compression_type()¶
- Returns:
the compression type.
- Return type:
New in version 3.14.
- get_encoding()¶
- Returns:
the character encoding.
- Return type:
The encoding is initially
None
. After a successful file loading or saving operation, the encoding is non-None
.New in version 3.14.
- get_newline_type()¶
- Returns:
the newline type.
- Return type:
New in version 3.14.
- is_deleted()¶
- Returns:
whether the file has been deleted.
- Return type:
Returns whether the file has been deleted. If the
GtkSource.File
:location
isNone
, returnsFalse
.To have an up-to-date value, you must first call
GtkSource.File.check_file_on_disk
().New in version 3.18.
- is_externally_modified()¶
- Returns:
whether the file is externally modified.
- Return type:
Returns whether the file is externally modified. If the
GtkSource.File
:location
isNone
, returnsFalse
.To have an up-to-date value, you must first call
GtkSource.File.check_file_on_disk
().New in version 3.18.
- is_local()¶
- Returns:
whether the file is local.
- Return type:
Returns whether the file is local. If the
GtkSource.File
:location
isNone
, returnsFalse
.New in version 3.18.
- is_readonly()¶
- Returns:
whether the file is read-only.
- Return type:
Returns whether the file is read-only. If the
GtkSource.File
:location
isNone
, returnsFalse
.To have an up-to-date value, you must first call
GtkSource.File.check_file_on_disk
().New in version 3.18.
Property Details¶
- GtkSource.File.props.compression_type¶
- Name:
compression-type
- Type:
- Default Value:
- Flags:
The compression type.
New in version 3.14.
- GtkSource.File.props.encoding¶
- Name:
encoding
- Type:
- Default Value:
- Flags:
The character encoding, initially
None
. After a successful file loading or saving operation, the encoding is non-None
.New in version 3.14.
- GtkSource.File.props.location¶
-
The location.
New in version 3.14.
- GtkSource.File.props.newline_type¶
- Name:
newline-type
- Type:
- Default Value:
- Flags:
The line ending type.
New in version 3.14.