pub struct File { /* private fields */ }Expand description
for
short. Entity tags are somewhat like a more abstract version of the
traditional mtime, and can be used to quickly determine if the file
has been modified from the version on the file system. See the
description of HTTP ETags in
RFC9110.
GFile Entity Tags are a very similar concept.
§Implements
GLib type: GObject with reference counted clone semantics.
Implementations§
Source§impl File
impl File
Sourcepub fn new_tmp_async<P: FnOnce(Result<(File, FileIOStream), Error>) + 'static>(
tmpl: Option<impl AsRef<Path>>,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
Available on crate feature v2_74 only.
pub fn new_tmp_async<P: FnOnce(Result<(File, FileIOStream), Error>) + 'static>( tmpl: Option<impl AsRef<Path>>, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
v2_74 only.Asynchronously opens a file in the preferred directory for temporary files (as returned by g_get_tmp_dir()) as g_file_new_tmp().
@tmpl should be a string in the GLib file name encoding
containing a sequence of six ‘X’ characters, and containing no
directory components. If it is None, a default template is used.
§tmpl
Template for the file
name, as in g_file_open_tmp(), or None for a default template
§io_priority
the I/O priority of the request
§cancellable
optional #GCancellable object, None to ignore
§callback
a #GAsyncReadyCallback to call when the request is done
pub fn new_tmp_future( tmpl: Option<impl AsRef<Path>>, io_priority: Priority, ) -> Pin<Box<dyn Future<Output = Result<(File, FileIOStream), Error>> + 'static>>
v2_74 only.Sourcepub fn new_tmp_dir_async<P: FnOnce(Result<File, Error>) + 'static>(
tmpl: Option<impl AsRef<Path>>,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
Available on crate feature v2_74 only.
pub fn new_tmp_dir_async<P: FnOnce(Result<File, Error>) + 'static>( tmpl: Option<impl AsRef<Path>>, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
v2_74 only.Asynchronously creates a directory in the preferred directory for temporary files (as returned by g_get_tmp_dir()) as g_dir_make_tmp().
@tmpl should be a string in the GLib file name encoding
containing a sequence of six ‘X’ characters, and containing no
directory components. If it is None, a default template is used.
§tmpl
Template for the file
name, as in g_dir_make_tmp(), or None for a default template
§io_priority
the I/O priority of the request
§cancellable
optional #GCancellable object, None to ignore
§callback
a #GAsyncReadyCallback to call when the request is done
pub fn new_tmp_dir_future( tmpl: Option<impl AsRef<Path>>, io_priority: Priority, ) -> Pin<Box<dyn Future<Output = Result<File, Error>> + 'static>>
v2_74 only.Source§impl File
impl File
pub const NONE: Option<&'static File> = None
Sourcepub fn new_build_filenamev(args: &[&Path]) -> File
Available on crate feature v2_78 only.
pub fn new_build_filenamev(args: &[&Path]) -> File
v2_78 only.Sourcepub fn for_commandline_arg(arg: impl AsRef<OsStr>) -> File
pub fn for_commandline_arg(arg: impl AsRef<OsStr>) -> File
Creates a #GFile with the given argument from the command line. The value of @arg can be either a URI, an absolute path or a relative path resolved relative to the current working directory. This operation never fails, but the returned object might not support any I/O operation if @arg points to a malformed path.
Note that on Windows, this function expects its argument to be in
UTF-8 – not the system code page. This means that you
should not use this function with string from argv as it is passed
to main(). g_win32_get_command_line() will return a UTF-8 version of
the commandline. #GApplication also uses UTF-8 but
g_application_command_line_create_file_for_arg() may be more useful
for you there. It is also always possible to use this function with
#GOptionContext arguments of type glib::OptionArg::Filename.
§arg
a command line string
§Returns
a new #GFile. Free the returned object with g_object_unref().
Sourcepub fn for_commandline_arg_and_cwd(
arg: impl AsRef<OsStr>,
cwd: impl AsRef<Path>,
) -> File
pub fn for_commandline_arg_and_cwd( arg: impl AsRef<OsStr>, cwd: impl AsRef<Path>, ) -> File
Creates a #GFile with the given argument from the command line.
This function is similar to g_file_new_for_commandline_arg() except that it allows for passing the current working directory as an argument instead of using the current working directory of the process.
This is useful if the commandline argument was given in a context other than the invocation of the current process.
See also g_application_command_line_create_file_for_arg().
§arg
a command line string
§cwd
the current working directory of the commandline
§Returns
a new #GFile
Sourcepub fn for_path(path: impl AsRef<Path>) -> File
pub fn for_path(path: impl AsRef<Path>) -> File
Constructs a #GFile for a given path. This operation never fails, but the returned object might not support any I/O operation if @path is malformed.
§path
a string containing a relative or absolute path. The string must be encoded in the glib filename encoding.
§Returns
a new #GFile for the given @path. Free the returned object with g_object_unref().
Sourcepub fn for_uri(uri: &str) -> File
pub fn for_uri(uri: &str) -> File
Constructs a #GFile for a given URI. This operation never fails, but the returned object might not support any I/O operation if @uri is malformed or if the uri type is not supported.
§uri
a UTF-8 string containing a URI
§Returns
a new #GFile for the given @uri. Free the returned object with g_object_unref().
Sourcepub fn new_tmp(
tmpl: Option<impl AsRef<Path>>,
) -> Result<(File, FileIOStream), Error>
pub fn new_tmp( tmpl: Option<impl AsRef<Path>>, ) -> Result<(File, FileIOStream), Error>
Opens a file in the preferred directory for temporary files (as returned by g_get_tmp_dir()) and returns a #GFile and #GFileIOStream pointing to it.
@tmpl should be a string in the GLib file name encoding
containing a sequence of six ‘X’ characters, and containing no
directory components. If it is None, a default template is used.
Unlike the other #GFile constructors, this will return None if
a temporary file could not be created.
§tmpl
Template for the file
name, as in g_file_open_tmp(), or None for a default template
§Returns
a new #GFile. Free the returned object with g_object_unref().
§iostream
on return, a #GFileIOStream for the created file
Sourcepub fn for_parse_name(parse_name: &str) -> File
pub fn for_parse_name(parse_name: &str) -> File
Trait Implementations§
impl Eq for File
Source§impl HasParamSpec for File
impl HasParamSpec for File
Source§impl<T: FileImpl> IsImplementable<T> for File
impl<T: FileImpl> IsImplementable<T> for File
Source§fn interface_init(iface: &mut Interface<Self>)
fn interface_init(iface: &mut Interface<Self>)
Source§fn instance_init(_instance: &mut InitializingObject<T>)
fn instance_init(_instance: &mut InitializingObject<T>)
Source§impl Ord for File
impl Ord for File
Source§fn cmp(&self, other: &Self) -> Ordering
fn cmp(&self, other: &Self) -> Ordering
Comparison for two GObjects.
Compares the memory addresses of the provided objects.
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<OT: ObjectType> PartialEq<OT> for File
impl<OT: ObjectType> PartialEq<OT> for File
Source§impl<OT: ObjectType> PartialOrd<OT> for File
impl<OT: ObjectType> PartialOrd<OT> for File
Source§fn partial_cmp(&self, other: &OT) -> Option<Ordering>
fn partial_cmp(&self, other: &OT) -> Option<Ordering>
Partial comparison for two GObjects.
Compares the memory addresses of the provided objects.
impl Send for File
Source§impl StaticType for File
impl StaticType for File
Source§fn static_type() -> Type
fn static_type() -> Type
Self.impl Sync for File
Auto Trait Implementations§
impl Freeze for File
impl RefUnwindSafe for File
impl Unpin for File
impl UnsafeUnpin for File
impl UnwindSafe for File
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Cast for Twhere
T: ObjectType,
impl<T> Cast for Twhere
T: ObjectType,
Source§fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
T. Read moreSource§fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
T. Read moreSource§fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
T. Read moreSource§fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
T. Read moreSource§fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
T. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while upcast will do many checks at compile-time already. downcast will
perform the same checks at runtime as dynamic_cast, but will also ensure some amount of
compile-time safety. Read moreSource§fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
T. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast and upcast will do many checks at compile-time already. Read moreSource§unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
T unconditionally. Read moreSource§unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
&T unconditionally. Read moreSource§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<O> FileExt for O
impl<O> FileExt for O
Source§fn append_to(
&self,
flags: FileCreateFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<FileOutputStream, Error>
fn append_to( &self, flags: FileCreateFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<FileOutputStream, Error>
Source§fn append_to_async<P: FnOnce(Result<FileOutputStream, Error>) + 'static>(
&self,
flags: FileCreateFlags,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn append_to_async<P: FnOnce(Result<FileOutputStream, Error>) + 'static>( &self, flags: FileCreateFlags, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn append_to_future( &self, flags: FileCreateFlags, io_priority: Priority, ) -> Pin<Box_<dyn Future<Output = Result<FileOutputStream, Error>> + 'static>>
Source§fn build_attribute_list_for_copy(
&self,
flags: FileCopyFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<GString, Error>
fn build_attribute_list_for_copy( &self, flags: FileCopyFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<GString, Error>
v2_68 only.fn copy( &self, destination: &impl IsA<File>, flags: FileCopyFlags, cancellable: Option<&impl IsA<Cancellable>>, progress_callback: Option<&mut dyn FnMut(i64, i64)>, ) -> Result<(), Error>
Source§fn copy_attributes(
&self,
destination: &impl IsA<File>,
flags: FileCopyFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn copy_attributes( &self, destination: &impl IsA<File>, flags: FileCopyFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
Source§fn create(
&self,
flags: FileCreateFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<FileOutputStream, Error>
fn create( &self, flags: FileCreateFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<FileOutputStream, Error>
Source§fn create_async<P: FnOnce(Result<FileOutputStream, Error>) + 'static>(
&self,
flags: FileCreateFlags,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn create_async<P: FnOnce(Result<FileOutputStream, Error>) + 'static>( &self, flags: FileCreateFlags, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn create_future( &self, flags: FileCreateFlags, io_priority: Priority, ) -> Pin<Box_<dyn Future<Output = Result<FileOutputStream, Error>> + 'static>>
Source§fn create_readwrite(
&self,
flags: FileCreateFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<FileIOStream, Error>
fn create_readwrite( &self, flags: FileCreateFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<FileIOStream, Error>
Source§fn create_readwrite_async<P: FnOnce(Result<FileIOStream, Error>) + 'static>(
&self,
flags: FileCreateFlags,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn create_readwrite_async<P: FnOnce(Result<FileIOStream, Error>) + 'static>( &self, flags: FileCreateFlags, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn create_readwrite_future( &self, flags: FileCreateFlags, io_priority: Priority, ) -> Pin<Box_<dyn Future<Output = Result<FileIOStream, Error>> + 'static>>
Source§fn delete(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn delete( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
Source§fn delete_async<P: FnOnce(Result<(), Error>) + 'static>(
&self,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn delete_async<P: FnOnce(Result<(), Error>) + 'static>( &self, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn delete_future( &self, io_priority: Priority, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
Source§fn eject_mountable_with_operation<P: FnOnce(Result<(), Error>) + 'static>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&impl IsA<MountOperation>>,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn eject_mountable_with_operation<P: FnOnce(Result<(), Error>) + 'static>( &self, flags: MountUnmountFlags, mount_operation: Option<&impl IsA<MountOperation>>, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn eject_mountable_with_operation_future( &self, flags: MountUnmountFlags, mount_operation: Option<&(impl IsA<MountOperation> + Clone + 'static)>, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
Source§fn enumerate_children(
&self,
attributes: &str,
flags: FileQueryInfoFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<FileEnumerator, Error>
fn enumerate_children( &self, attributes: &str, flags: FileQueryInfoFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<FileEnumerator, Error>
FileEnumerator object that will give out
FileInfo objects for all the files in the directory. Read morefn equal(&self, file2: &impl IsA<File>) -> bool
Source§fn find_enclosing_mount(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Mount, Error>
fn find_enclosing_mount( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<Mount, Error>
Source§fn basename(&self) -> Option<PathBuf>
fn basename(&self) -> Option<PathBuf>
Source§fn child(&self, name: impl AsRef<Path>) -> File
fn child(&self, name: impl AsRef<Path>) -> File
Source§fn child_for_display_name(&self, display_name: &str) -> Result<File, Error>
fn child_for_display_name(&self, display_name: &str) -> Result<File, Error>
None
and @error will be set. This is very useful when constructing a
#GFile for a new file and the user entered the filename in the
user interface, for instance when you select a directory and
type a filename in the file selector. Read moreSource§fn parse_name(&self) -> GString
fn parse_name(&self) -> GString
Source§fn relative_path(&self, descendant: &impl IsA<File>) -> Option<PathBuf>
fn relative_path(&self, descendant: &impl IsA<File>) -> Option<PathBuf>
Source§fn uri_scheme(&self) -> Option<GString>
fn uri_scheme(&self) -> Option<GString>
Source§fn has_parent(&self, parent: Option<&impl IsA<File>>) -> bool
fn has_parent(&self, parent: Option<&impl IsA<File>>) -> bool
Source§fn has_prefix(&self, prefix: &impl IsA<File>) -> bool
fn has_prefix(&self, prefix: &impl IsA<File>) -> bool
Source§fn has_uri_scheme(&self, uri_scheme: &str) -> bool
fn has_uri_scheme(&self, uri_scheme: &str) -> bool
Source§fn load_bytes(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(Bytes, Option<GString>), Error>
fn load_bytes( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(Bytes, Option<GString>), Error>
Source§fn load_bytes_async<P: FnOnce(Result<(Bytes, Option<GString>), Error>) + 'static>(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn load_bytes_async<P: FnOnce(Result<(Bytes, Option<GString>), Error>) + 'static>( &self, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn load_bytes_future( &self, ) -> Pin<Box_<dyn Future<Output = Result<(Bytes, Option<GString>), Error>> + 'static>>
Source§fn make_directory(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn make_directory( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
Source§fn make_directory_async<P: FnOnce(Result<(), Error>) + 'static>(
&self,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn make_directory_async<P: FnOnce(Result<(), Error>) + 'static>( &self, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn make_directory_future( &self, io_priority: Priority, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
Source§fn make_directory_with_parents(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn make_directory_with_parents( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
IOErrorEnum::NotSupported. If the directory itself already exists,
this function will fail setting @error to IOErrorEnum::Exists, unlike
the similar g_mkdir_with_parents(). Read moreSource§fn make_symbolic_link(
&self,
symlink_value: impl AsRef<Path>,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn make_symbolic_link( &self, symlink_value: impl AsRef<Path>, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
Source§fn measure_disk_usage(
&self,
flags: FileMeasureFlags,
cancellable: Option<&impl IsA<Cancellable>>,
progress_callback: Option<&mut dyn FnMut(bool, u64, u64, u64)>,
) -> Result<(u64, u64, u64), Error>
fn measure_disk_usage( &self, flags: FileMeasureFlags, cancellable: Option<&impl IsA<Cancellable>>, progress_callback: Option<&mut dyn FnMut(bool, u64, u64, u64)>, ) -> Result<(u64, u64, u64), Error>
Source§fn monitor(
&self,
flags: FileMonitorFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<FileMonitor, Error>
fn monitor( &self, flags: FileMonitorFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<FileMonitor, Error>
Source§fn monitor_directory(
&self,
flags: FileMonitorFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<FileMonitor, Error>
fn monitor_directory( &self, flags: FileMonitorFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<FileMonitor, Error>
Source§fn monitor_file(
&self,
flags: FileMonitorFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<FileMonitor, Error>
fn monitor_file( &self, flags: FileMonitorFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<FileMonitor, Error>
Source§fn mount_enclosing_volume<P: FnOnce(Result<(), Error>) + 'static>(
&self,
flags: MountMountFlags,
mount_operation: Option<&impl IsA<MountOperation>>,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn mount_enclosing_volume<P: FnOnce(Result<(), Error>) + 'static>( &self, flags: MountMountFlags, mount_operation: Option<&impl IsA<MountOperation>>, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn mount_enclosing_volume_future( &self, flags: MountMountFlags, mount_operation: Option<&(impl IsA<MountOperation> + Clone + 'static)>, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
Source§fn mount_mountable<P: FnOnce(Result<File, Error>) + 'static>(
&self,
flags: MountMountFlags,
mount_operation: Option<&impl IsA<MountOperation>>,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn mount_mountable<P: FnOnce(Result<File, Error>) + 'static>( &self, flags: MountMountFlags, mount_operation: Option<&impl IsA<MountOperation>>, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn mount_mountable_future( &self, flags: MountMountFlags, mount_operation: Option<&(impl IsA<MountOperation> + Clone + 'static)>, ) -> Pin<Box_<dyn Future<Output = Result<File, Error>> + 'static>>
Source§fn move_(
&self,
destination: &impl IsA<File>,
flags: FileCopyFlags,
cancellable: Option<&impl IsA<Cancellable>>,
progress_callback: Option<&mut dyn FnMut(i64, i64)>,
) -> Result<(), Error>
fn move_( &self, destination: &impl IsA<File>, flags: FileCopyFlags, cancellable: Option<&impl IsA<Cancellable>>, progress_callback: Option<&mut dyn FnMut(i64, i64)>, ) -> Result<(), Error>
Source§fn open_readwrite(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<FileIOStream, Error>
fn open_readwrite( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<FileIOStream, Error>
Source§fn open_readwrite_async<P: FnOnce(Result<FileIOStream, Error>) + 'static>(
&self,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn open_readwrite_async<P: FnOnce(Result<FileIOStream, Error>) + 'static>( &self, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn open_readwrite_future( &self, io_priority: Priority, ) -> Pin<Box_<dyn Future<Output = Result<FileIOStream, Error>> + 'static>>
Source§fn peek_path(&self) -> Option<PathBuf>
fn peek_path(&self) -> Option<PathBuf>
g_file_* APIs with native ones. It
also avoids an extra duplicated string when possible, so will be
generally more efficient. Read moreSource§fn poll_mountable<P: FnOnce(Result<(), Error>) + 'static>(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn poll_mountable<P: FnOnce(Result<(), Error>) + 'static>( &self, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
FileType::Mountable. Read morefn poll_mountable_future( &self, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
Source§fn query_default_handler(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<AppInfo, Error>
fn query_default_handler( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<AppInfo, Error>
Source§fn query_default_handler_async<P: FnOnce(Result<AppInfo, Error>) + 'static>(
&self,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn query_default_handler_async<P: FnOnce(Result<AppInfo, Error>) + 'static>( &self, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
v2_60 only.Source§fn query_default_handler_future(
&self,
io_priority: Priority,
) -> Pin<Box_<dyn Future<Output = Result<AppInfo, Error>> + 'static>>
fn query_default_handler_future( &self, io_priority: Priority, ) -> Pin<Box_<dyn Future<Output = Result<AppInfo, Error>> + 'static>>
v2_60 only.Source§fn query_exists(&self, cancellable: Option<&impl IsA<Cancellable>>) -> bool
fn query_exists(&self, cancellable: Option<&impl IsA<Cancellable>>) -> bool
Source§fn query_file_type(
&self,
flags: FileQueryInfoFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> FileType
fn query_file_type( &self, flags: FileQueryInfoFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> FileType
Source§fn query_filesystem_info(
&self,
attributes: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<FileInfo, Error>
fn query_filesystem_info( &self, attributes: &str, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<FileInfo, Error>
Source§fn query_filesystem_info_async<P: FnOnce(Result<FileInfo, Error>) + 'static>(
&self,
attributes: &str,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn query_filesystem_info_async<P: FnOnce(Result<FileInfo, Error>) + 'static>( &self, attributes: &str, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn query_filesystem_info_future( &self, attributes: &str, io_priority: Priority, ) -> Pin<Box_<dyn Future<Output = Result<FileInfo, Error>> + 'static>>
Source§fn query_info(
&self,
attributes: &str,
flags: FileQueryInfoFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<FileInfo, Error>
fn query_info( &self, attributes: &str, flags: FileQueryInfoFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<FileInfo, Error>
Source§fn query_info_async<P: FnOnce(Result<FileInfo, Error>) + 'static>(
&self,
attributes: &str,
flags: FileQueryInfoFlags,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn query_info_async<P: FnOnce(Result<FileInfo, Error>) + 'static>( &self, attributes: &str, flags: FileQueryInfoFlags, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn query_info_future( &self, attributes: &str, flags: FileQueryInfoFlags, io_priority: Priority, ) -> Pin<Box_<dyn Future<Output = Result<FileInfo, Error>> + 'static>>
Source§fn query_settable_attributes(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<FileAttributeInfoList, Error>
fn query_settable_attributes( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<FileAttributeInfoList, Error>
Source§fn query_writable_namespaces(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<FileAttributeInfoList, Error>
fn query_writable_namespaces( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<FileAttributeInfoList, Error>
Source§fn read(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<FileInputStream, Error>
fn read( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<FileInputStream, Error>
Source§fn read_async<P: FnOnce(Result<FileInputStream, Error>) + 'static>(
&self,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn read_async<P: FnOnce(Result<FileInputStream, Error>) + 'static>( &self, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn read_future( &self, io_priority: Priority, ) -> Pin<Box_<dyn Future<Output = Result<FileInputStream, Error>> + 'static>>
Source§fn replace(
&self,
etag: Option<&str>,
make_backup: bool,
flags: FileCreateFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<FileOutputStream, Error>
fn replace( &self, etag: Option<&str>, make_backup: bool, flags: FileCreateFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<FileOutputStream, Error>
Source§fn replace_async<P: FnOnce(Result<FileOutputStream, Error>) + 'static>(
&self,
etag: Option<&str>,
make_backup: bool,
flags: FileCreateFlags,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn replace_async<P: FnOnce(Result<FileOutputStream, Error>) + 'static>( &self, etag: Option<&str>, make_backup: bool, flags: FileCreateFlags, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn replace_future( &self, etag: Option<&str>, make_backup: bool, flags: FileCreateFlags, io_priority: Priority, ) -> Pin<Box_<dyn Future<Output = Result<FileOutputStream, Error>> + 'static>>
Source§fn replace_contents(
&self,
contents: &[u8],
etag: Option<&str>,
make_backup: bool,
flags: FileCreateFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Option<GString>, Error>
fn replace_contents( &self, contents: &[u8], etag: Option<&str>, make_backup: bool, flags: FileCreateFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<Option<GString>, Error>
Source§fn replace_contents_bytes_async<P: FnOnce(Result<Option<GString>, Error>) + 'static>(
&self,
contents: &Bytes,
etag: Option<&str>,
make_backup: bool,
flags: FileCreateFlags,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn replace_contents_bytes_async<P: FnOnce(Result<Option<GString>, Error>) + 'static>( &self, contents: &Bytes, etag: Option<&str>, make_backup: bool, flags: FileCreateFlags, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn replace_contents_bytes_future( &self, contents: &Bytes, etag: Option<&str>, make_backup: bool, flags: FileCreateFlags, ) -> Pin<Box_<dyn Future<Output = Result<Option<GString>, Error>> + 'static>>
Source§fn replace_readwrite(
&self,
etag: Option<&str>,
make_backup: bool,
flags: FileCreateFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<FileIOStream, Error>
fn replace_readwrite( &self, etag: Option<&str>, make_backup: bool, flags: FileCreateFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<FileIOStream, Error>
Source§fn replace_readwrite_async<P: FnOnce(Result<FileIOStream, Error>) + 'static>(
&self,
etag: Option<&str>,
make_backup: bool,
flags: FileCreateFlags,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn replace_readwrite_async<P: FnOnce(Result<FileIOStream, Error>) + 'static>( &self, etag: Option<&str>, make_backup: bool, flags: FileCreateFlags, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn replace_readwrite_future( &self, etag: Option<&str>, make_backup: bool, flags: FileCreateFlags, io_priority: Priority, ) -> Pin<Box_<dyn Future<Output = Result<FileIOStream, Error>> + 'static>>
Source§fn resolve_relative_path(&self, relative_path: impl AsRef<Path>) -> File
fn resolve_relative_path(&self, relative_path: impl AsRef<Path>) -> File
Source§fn set_attribute_byte_string(
&self,
attribute: &str,
value: &str,
flags: FileQueryInfoFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn set_attribute_byte_string( &self, attribute: &str, value: &str, flags: FileQueryInfoFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
FileAttributeType::ByteString to @value.
If @attribute is of a different type, this operation will fail,
returning false. Read moreSource§fn set_attribute_int32(
&self,
attribute: &str,
value: i32,
flags: FileQueryInfoFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn set_attribute_int32( &self, attribute: &str, value: i32, flags: FileQueryInfoFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
FileAttributeType::Int32 to @value.
If @attribute is of a different type, this operation will fail. Read moreSource§fn set_attribute_int64(
&self,
attribute: &str,
value: i64,
flags: FileQueryInfoFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn set_attribute_int64( &self, attribute: &str, value: i64, flags: FileQueryInfoFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
FileAttributeType::Int64 to @value.
If @attribute is of a different type, this operation will fail. Read moreSource§fn set_attribute_string(
&self,
attribute: &str,
value: &str,
flags: FileQueryInfoFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn set_attribute_string( &self, attribute: &str, value: &str, flags: FileQueryInfoFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
FileAttributeType::String to @value.
If @attribute is of a different type, this operation will fail. Read moreSource§fn set_attribute_uint32(
&self,
attribute: &str,
value: u32,
flags: FileQueryInfoFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn set_attribute_uint32( &self, attribute: &str, value: u32, flags: FileQueryInfoFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
FileAttributeType::Uint32 to @value.
If @attribute is of a different type, this operation will fail. Read moreSource§fn set_attribute_uint64(
&self,
attribute: &str,
value: u64,
flags: FileQueryInfoFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn set_attribute_uint64( &self, attribute: &str, value: u64, flags: FileQueryInfoFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
FileAttributeType::Uint64 to @value.
If @attribute is of a different type, this operation will fail. Read moreSource§fn set_attributes_async<P: FnOnce(Result<FileInfo, Error>) + 'static>(
&self,
info: &FileInfo,
flags: FileQueryInfoFlags,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn set_attributes_async<P: FnOnce(Result<FileInfo, Error>) + 'static>( &self, info: &FileInfo, flags: FileQueryInfoFlags, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn set_attributes_future( &self, info: &FileInfo, flags: FileQueryInfoFlags, io_priority: Priority, ) -> Pin<Box_<dyn Future<Output = Result<FileInfo, Error>> + 'static>>
Source§fn set_attributes_from_info(
&self,
info: &FileInfo,
flags: FileQueryInfoFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn set_attributes_from_info( &self, info: &FileInfo, flags: FileQueryInfoFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
Source§fn set_display_name(
&self,
display_name: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<File, Error>
fn set_display_name( &self, display_name: &str, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<File, Error>
Source§fn set_display_name_async<P: FnOnce(Result<File, Error>) + 'static>(
&self,
display_name: &str,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn set_display_name_async<P: FnOnce(Result<File, Error>) + 'static>( &self, display_name: &str, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn set_display_name_future( &self, display_name: &str, io_priority: Priority, ) -> Pin<Box_<dyn Future<Output = Result<File, Error>> + 'static>>
Source§fn start_mountable<P: FnOnce(Result<(), Error>) + 'static>(
&self,
flags: DriveStartFlags,
start_operation: Option<&impl IsA<MountOperation>>,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn start_mountable<P: FnOnce(Result<(), Error>) + 'static>( &self, flags: DriveStartFlags, start_operation: Option<&impl IsA<MountOperation>>, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
FileType::Mountable.
Using @start_operation, you can request callbacks when, for instance,
passwords are needed during authentication. Read morefn start_mountable_future( &self, flags: DriveStartFlags, start_operation: Option<&(impl IsA<MountOperation> + Clone + 'static)>, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
Source§fn stop_mountable<P: FnOnce(Result<(), Error>) + 'static>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&impl IsA<MountOperation>>,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn stop_mountable<P: FnOnce(Result<(), Error>) + 'static>( &self, flags: MountUnmountFlags, mount_operation: Option<&impl IsA<MountOperation>>, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
FileType::Mountable. Read morefn stop_mountable_future( &self, flags: MountUnmountFlags, mount_operation: Option<&(impl IsA<MountOperation> + Clone + 'static)>, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
Source§fn supports_thread_contexts(&self) -> bool
fn supports_thread_contexts(&self) -> bool
Source§fn trash(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn trash( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
IOErrorEnum::NotSupported error. Since GLib 2.66, the x-gvfs-notrash unix
mount option can be used to disable g_file_trash() support for particular
mounts, the IOErrorEnum::NotSupported error will be returned in that case.
Since 2.82, the x-gvfs-trash unix mount option can be used to enable
g_file_trash() support for particular system mounts. Read moreSource§fn trash_async<P: FnOnce(Result<(), Error>) + 'static>(
&self,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn trash_async<P: FnOnce(Result<(), Error>) + 'static>( &self, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn trash_future( &self, io_priority: Priority, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
Source§fn unmount_mountable_with_operation<P: FnOnce(Result<(), Error>) + 'static>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&impl IsA<MountOperation>>,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn unmount_mountable_with_operation<P: FnOnce(Result<(), Error>) + 'static>( &self, flags: MountUnmountFlags, mount_operation: Option<&impl IsA<MountOperation>>, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
FileType::Mountable. Read morefn unmount_mountable_with_operation_future( &self, flags: MountUnmountFlags, mount_operation: Option<&(impl IsA<MountOperation> + Clone + 'static)>, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
Source§impl<O> FileExtManual for O
impl<O> FileExtManual for O
Source§fn replace_contents_async<B: AsRef<[u8]> + Send + 'static, R: FnOnce(Result<(B, Option<GString>), (B, Error)>) + 'static, C: IsA<Cancellable>>(
&self,
contents: B,
etag: Option<&str>,
make_backup: bool,
flags: FileCreateFlags,
cancellable: Option<&C>,
callback: R,
)
fn replace_contents_async<B: AsRef<[u8]> + Send + 'static, R: FnOnce(Result<(B, Option<GString>), (B, Error)>) + 'static, C: IsA<Cancellable>>( &self, contents: B, etag: Option<&str>, make_backup: bool, flags: FileCreateFlags, cancellable: Option<&C>, callback: R, )
fn replace_contents_future<B: AsRef<[u8]> + Send + 'static>( &self, contents: B, etag: Option<&str>, make_backup: bool, flags: FileCreateFlags, ) -> Pin<Box<dyn Future<Output = Result<(B, Option<GString>), (B, Error)>> + 'static>>
fn enumerate_children_async<P: IsA<Cancellable>, Q: FnOnce(Result<FileEnumerator, Error>) + 'static>( &self, attributes: &str, flags: FileQueryInfoFlags, io_priority: Priority, cancellable: Option<&P>, callback: Q, )
fn enumerate_children_future( &self, attributes: &str, flags: FileQueryInfoFlags, io_priority: Priority, ) -> Pin<Box<dyn Future<Output = Result<FileEnumerator, Error>> + 'static>>
Source§fn copy_async<Q: FnOnce(Result<(), Error>) + 'static>(
&self,
destination: &impl IsA<File>,
flags: FileCopyFlags,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
progress_callback: Option<Box<dyn FnMut(i64, i64)>>,
callback: Q,
)
fn copy_async<Q: FnOnce(Result<(), Error>) + 'static>( &self, destination: &impl IsA<File>, flags: FileCopyFlags, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, progress_callback: Option<Box<dyn FnMut(i64, i64)>>, callback: Q, )
fn copy_future( &self, destination: &(impl IsA<File> + Clone + 'static), flags: FileCopyFlags, io_priority: Priority, ) -> (Pin<Box<dyn Future<Output = Result<(), Error>> + 'static>>, Pin<Box<dyn Stream<Item = (i64, i64)> + 'static>>)
Source§fn load_contents(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(Slice<u8>, Option<GString>), Error>
fn load_contents( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(Slice<u8>, Option<GString>), Error>
Source§fn load_contents_async<P: FnOnce(Result<(Slice<u8>, Option<GString>), Error>) + 'static>(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn load_contents_async<P: FnOnce(Result<(Slice<u8>, Option<GString>), Error>) + 'static>( &self, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn load_contents_future( &self, ) -> impl Future<Output = Result<(Slice<u8>, Option<GString>), Error>> + Unpin + 'static
Source§fn load_partial_contents_async<P: FnMut(&[u8]) -> bool + 'static, Q: FnOnce(Result<(Slice<u8>, Option<GString>), Error>) + 'static>(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
read_more_callback: P,
callback: Q,
)
fn load_partial_contents_async<P: FnMut(&[u8]) -> bool + 'static, Q: FnOnce(Result<(Slice<u8>, Option<GString>), Error>) + 'static>( &self, cancellable: Option<&impl IsA<Cancellable>>, read_more_callback: P, callback: Q, )
Source§fn measure_disk_usage_async<P: FnOnce(Result<(u64, u64, u64), Error>) + 'static>(
&self,
flags: FileMeasureFlags,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
progress_callback: Option<Box<dyn FnMut(bool, u64, u64, u64) + 'static>>,
callback: P,
)
fn measure_disk_usage_async<P: FnOnce(Result<(u64, u64, u64), Error>) + 'static>( &self, flags: FileMeasureFlags, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, progress_callback: Option<Box<dyn FnMut(bool, u64, u64, u64) + 'static>>, callback: P, )
fn measure_disk_usage_future( &self, flags: FileMeasureFlags, io_priority: Priority, ) -> (Pin<Box<dyn Future<Output = Result<(u64, u64, u64), Error>> + 'static>>, Pin<Box<dyn Stream<Item = (bool, u64, u64, u64)> + 'static>>)
Source§fn move_async<Q: FnOnce(Result<(), Error>) + 'static>(
&self,
destination: &impl IsA<File>,
flags: FileCopyFlags,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
progress_callback: Option<Box<dyn FnMut(i64, i64)>>,
callback: Q,
)
fn move_async<Q: FnOnce(Result<(), Error>) + 'static>( &self, destination: &impl IsA<File>, flags: FileCopyFlags, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, progress_callback: Option<Box<dyn FnMut(i64, i64)>>, callback: Q, )
v2_72 only.Source§fn make_symbolic_link_async<P: FnOnce(Result<(), Error>) + 'static>(
&self,
symlink_value: impl AsRef<Path>,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn make_symbolic_link_async<P: FnOnce(Result<(), Error>) + 'static>( &self, symlink_value: impl AsRef<Path>, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
v2_74 only.Source§fn make_symbolic_link_future(
&self,
symlink_value: impl AsRef<Path>,
io_priority: Priority,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static>>
fn make_symbolic_link_future( &self, symlink_value: impl AsRef<Path>, io_priority: Priority, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static>>
v2_74 only.Source§fn move_future(
&self,
destination: &(impl IsA<File> + Clone + 'static),
flags: FileCopyFlags,
io_priority: Priority,
) -> (Pin<Box<dyn Future<Output = Result<(), Error>> + 'static>>, Pin<Box<dyn Stream<Item = (i64, i64)> + 'static>>)
fn move_future( &self, destination: &(impl IsA<File> + Clone + 'static), flags: FileCopyFlags, io_priority: Priority, ) -> (Pin<Box<dyn Future<Output = Result<(), Error>> + 'static>>, Pin<Box<dyn Stream<Item = (i64, i64)> + 'static>>)
v2_72 only.fn set_attribute<'a>( &self, attribute: &str, value: impl Into<FileAttributeValue<'a>>, flags: FileQueryInfoFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<'a, T, C, E> FromValueOptional<'a> for Twhere
T: FromValue<'a, Checker = C>,
C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>,
E: Error + Send + 'static,
Source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
impl<Super, Sub> MayDowncastTo<Sub> for Super
Source§impl<T> ObjectExt for Twhere
T: ObjectType,
impl<T> ObjectExt for Twhere
T: ObjectType,
Source§fn is<U>(&self) -> boolwhere
U: StaticType,
fn is<U>(&self) -> boolwhere
U: StaticType,
true if the object is an instance of (can be cast to) T.Source§fn object_class(&self) -> &Class<Object>
fn object_class(&self) -> &Class<Object>
ObjectClass of the object. Read moreSource§fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
T. Read moreSource§fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
T of the object. Read moreSource§fn set_property_from_value(&self, property_name: &str, value: &Value)
fn set_property_from_value(&self, property_name: &str, value: &Value)
Source§fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
Source§fn set_properties_from_value(&self, property_values: &[(&str, Value)])
fn set_properties_from_value(&self, property_values: &[(&str, Value)])
Source§fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
property_name of the object and cast it to the type V. Read moreSource§fn property_value(&self, property_name: &str) -> Value
fn property_value(&self, property_name: &str) -> Value
property_name of the object. Read moreSource§fn has_property(&self, property_name: &str) -> bool
fn has_property(&self, property_name: &str) -> bool
property_name.Source§fn has_property_with_type(&self, property_name: &str, type_: Type) -> bool
fn has_property_with_type(&self, property_name: &str, type_: Type) -> bool
property_name of the given type_.Source§fn property_type(&self, property_name: &str) -> Option<Type>
fn property_type(&self, property_name: &str) -> Option<Type>
property_name of this object. Read moreSource§fn find_property(&self, property_name: &str) -> Option<ParamSpec>
fn find_property(&self, property_name: &str) -> Option<ParamSpec>
ParamSpec of the property property_name of this object.Source§fn list_properties(&self) -> PtrSlice<ParamSpec>
fn list_properties(&self) -> PtrSlice<ParamSpec>
ParamSpec of the properties of this object.Source§fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
Source§unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
key. Read moreSource§unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
key. Read moreSource§unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
key. Read moreSource§unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
key. Read moreSource§unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
key. Read moreSource§unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
key. Read moreSource§fn block_signal(&self, handler_id: &SignalHandlerId)
fn block_signal(&self, handler_id: &SignalHandlerId)
Source§fn unblock_signal(&self, handler_id: &SignalHandlerId)
fn unblock_signal(&self, handler_id: &SignalHandlerId)
Source§fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
Source§fn stop_signal_emission_by_name(&self, signal_name: &str)
fn stop_signal_emission_by_name(&self, signal_name: &str)
Source§fn connect<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name on this object. Read moreSource§fn connect_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id on this object. Read moreSource§fn connect_local<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name on this object. Read moreSource§fn connect_local_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id on this object. Read moreSource§unsafe fn connect_unsafe<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name on this object. Read moreSource§unsafe fn connect_unsafe_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id on this object. Read moreSource§fn connect_closure(
&self,
signal_name: &str,
after: bool,
closure: RustClosure,
) -> SignalHandlerId
fn connect_closure( &self, signal_name: &str, after: bool, closure: RustClosure, ) -> SignalHandlerId
signal_name on this object. Read moreSource§fn connect_closure_id(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
closure: RustClosure,
) -> SignalHandlerId
fn connect_closure_id( &self, signal_id: SignalId, details: Option<Quark>, after: bool, closure: RustClosure, ) -> SignalHandlerId
signal_id on this object. Read moreSource§fn watch_closure(&self, closure: &impl AsRef<Closure>)
fn watch_closure(&self, closure: &impl AsRef<Closure>)
closure to the lifetime of the object. When
the object’s reference count drops to zero, the closure will be
invalidated. An invalidated closure will ignore any calls to
invoke_with_values, or
invoke when using Rust closures.Source§fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
Self::emit but takes Value for the arguments.Source§fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_by_name_with_values(
&self,
signal_name: &str,
args: &[Value],
) -> Option<Value>
fn emit_by_name_with_values( &self, signal_name: &str, args: &[Value], ) -> Option<Value>
Source§fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_by_name_with_details_and_values(
&self,
signal_name: &str,
details: Quark,
args: &[Value],
) -> Option<Value>
fn emit_by_name_with_details_and_values( &self, signal_name: &str, details: Quark, args: &[Value], ) -> Option<Value>
Source§fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_with_details_and_values(
&self,
signal_id: SignalId,
details: Quark,
args: &[Value],
) -> Option<Value>
fn emit_with_details_and_values( &self, signal_id: SignalId, details: Quark, args: &[Value], ) -> Option<Value>
Source§fn disconnect(&self, handler_id: SignalHandlerId)
fn disconnect(&self, handler_id: SignalHandlerId)
Source§fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
notify signal of the object. Read moreSource§fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
notify signal of the object. Read moreSource§unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F,
) -> SignalHandlerId
unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F, ) -> SignalHandlerId
notify signal of the object. Read moreSource§fn notify(&self, property_name: &str)
fn notify(&self, property_name: &str)
Source§fn notify_by_pspec(&self, pspec: &ParamSpec)
fn notify_by_pspec(&self, pspec: &ParamSpec)
Source§fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
Source§fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>where
F: FnOnce() + 'static,
fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>where
F: FnOnce() + 'static,
Source§fn bind_property<'a, 'f, 't, O>(
&'a self,
source_property: &'a str,
target: &'a O,
target_property: &'a str,
) -> BindingBuilder<'a, 'f, 't>where
O: ObjectType,
fn bind_property<'a, 'f, 't, O>(
&'a self,
source_property: &'a str,
target: &'a O,
target_property: &'a str,
) -> BindingBuilder<'a, 'f, 't>where
O: ObjectType,
Source§unsafe fn run_dispose(&self)
unsafe fn run_dispose(&self)
Source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
Source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
Source§fn ensure_type()
fn ensure_type()
Source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
Source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue clone of self.