Trait sourceview5::FileExt [−][src]
Required methods
fn check_file_on_disk(&self)
[src]
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.
File
doesn’t create a gio::FileMonitor
to track those properties, so
this function needs to be called instead. Creating lots of gio::FileMonitor
’s
would take lots of resources.
Since this function is synchronous, it is advised to call it only on local
files. See FileExt::is_local
.
fn get_compression_type(&self) -> CompressionType
[src]
Returns
the compression type.
fn get_encoding(&self) -> Option<Encoding>
[src]
The encoding is initially None
. After a successful file loading or saving
operation, the encoding is non-None
.
Returns
the character encoding.
fn get_location(&self) -> Option<File>
[src]
Returns
the gio::File
.
fn get_newline_type(&self) -> NewlineType
[src]
Returns
the newline type.
fn is_deleted(&self) -> bool
[src]
Returns whether the file has been deleted. If the
File:location
is None
, returns false
.
To have an up-to-date value, you must first call
FileExt::check_file_on_disk
.
Returns
whether the file has been deleted.
fn is_externally_modified(&self) -> bool
[src]
Returns whether the file is externally modified. If the
File:location
is None
, returns false
.
To have an up-to-date value, you must first call
FileExt::check_file_on_disk
.
Returns
whether the file is externally modified.
fn is_local(&self) -> bool
[src]
Returns whether the file is local. If the File:location
is None
,
returns false
.
Returns
whether the file is local.
fn is_readonly(&self) -> bool
[src]
Returns whether the file is read-only. If the
File:location
is None
, returns false
.
To have an up-to-date value, you must first call
FileExt::check_file_on_disk
.
Returns
whether the file is read-only.
fn set_location<P: IsA<File>>(&self, location: Option<&P>)
[src]
fn get_property_read_only(&self) -> bool
[src]
Whether the file is read-only or not. The value of this property is not updated automatically (there is no file monitors).
fn connect_property_compression_type_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_encoding_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_location_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_newline_type_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_read_only_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<File>> FileExt for O
[src]
fn check_file_on_disk(&self)
[src]
fn get_compression_type(&self) -> CompressionType
[src]
fn get_encoding(&self) -> Option<Encoding>
[src]
fn get_location(&self) -> Option<File>
[src]
fn get_newline_type(&self) -> NewlineType
[src]
fn is_deleted(&self) -> bool
[src]
fn is_externally_modified(&self) -> bool
[src]
fn is_local(&self) -> bool
[src]
fn is_readonly(&self) -> bool
[src]
fn set_location<P: IsA<File>>(&self, location: Option<&P>)
[src]
fn get_property_read_only(&self) -> bool
[src]
fn connect_property_compression_type_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_encoding_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_location_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_newline_type_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_read_only_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId