Class: GtkSource::File
- Inherits:
-
Object
- Object
- GtkSource::File
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#check_file_on_disk ⇒ nil
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.
-
#compression_type ⇒ GtkSource::CompressionType
The compression type.
-
#compression_type=(compression_type) ⇒ GtkSource::CompressionType
The compression type.
-
#encoding ⇒ GtkSource::Encoding
The character encoding, initially nil.
-
#encoding=(encoding) ⇒ GtkSource::Encoding
The character encoding, initially nil.
-
#initialize ⇒ GtkSource::File
constructor
A new Gtk::SourceFile object.
-
#is_deleted ⇒ Boolean
Returns whether the file has been deleted.
-
#is_externally_modified ⇒ Boolean
Returns whether the file is externally modified.
-
#is_local ⇒ Boolean
Returns whether the file is local.
-
#is_readonly ⇒ Boolean
Returns whether the file is read-only.
-
#location ⇒ Gio::File
The location.
-
#location=(location) ⇒ Gio::File
The location.
-
#newline_type ⇒ GtkSource::NewlineType
The line ending type.
-
#newline_type=(newline_type) ⇒ GtkSource::NewlineType
The line ending type.
-
#read_only=(read_only) ⇒ Boolean
Whether the file is read-only or not.
-
#read_only? ⇒ Boolean
Whether the file is read-only or not.
-
#set_mount_operation_factory(callback, user_data, notify) ⇒ nil
Sets a [callbackMountOperationFactory] function that will be called when a [classGio.MountOperation] must be created.
Constructor Details
#initialize ⇒ GtkSource::File
Returns a new Gtk::SourceFile object.
Instance Method Details
#check_file_on_disk ⇒ nil
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::SourceFile doesn't create a [classGio.FileMonitor] to track those properties, so this function needs to be called instead. Creating lots of [classGio.FileMonitor]'s would take lots of resources.
Since this function is synchronous, it is advised to call it only on local files. See [methodFile.is_local].
#compression_type ⇒ GtkSource::CompressionType
The compression type.
#compression_type=(compression_type) ⇒ GtkSource::CompressionType
The compression type.
#encoding ⇒ GtkSource::Encoding
The character encoding, initially nil. After a successful file loading or saving operation, the encoding is non-nil.
#encoding=(encoding) ⇒ GtkSource::Encoding
The character encoding, initially nil. After a successful file loading or saving operation, the encoding is non-nil.
#is_deleted ⇒ Boolean
Returns whether the file has been deleted. If the [propertyFile:location] is nil, returns false.
To have an up-to-date value, you must first call [methodFile.check_file_on_disk].
#is_externally_modified ⇒ Boolean
Returns whether the file is externally modified. If the [propertyFile:location] is nil, returns false.
To have an up-to-date value, you must first call [methodFile.check_file_on_disk].
#is_local ⇒ Boolean
Returns whether the file is local. If the [propertyFile:location] is nil, returns false.
#is_readonly ⇒ Boolean
Returns whether the file is read-only. If the [propertyFile:location] is nil, returns false.
To have an up-to-date value, you must first call [methodFile.check_file_on_disk].
#location ⇒ Gio::File
The location.
#location=(location) ⇒ Gio::File
The location.
#newline_type ⇒ GtkSource::NewlineType
The line ending type.
#newline_type=(newline_type) ⇒ GtkSource::NewlineType
The line ending type.
#read_only=(read_only) ⇒ Boolean
Whether the file is read-only or not. The value of this property is not updated automatically (there is no file monitors).
#read_only? ⇒ Boolean
Whether the file is read-only or not. The value of this property is not updated automatically (there is no file monitors).
#set_mount_operation_factory(callback, user_data, notify) ⇒ nil
Sets a [callbackMountOperationFactory] function that will be called when a [classGio.MountOperation] must be created.
This is useful for creating a [classGtk.MountOperation] with the parent [classGtk.Window].
If a mount operation factory isn't set, [ctorGio.MountOperation.new] will be called.