Skip to main content

FileImpl

Trait FileImpl 

Source
pub trait FileImpl: ObjectImpl + ObjectSubclass<Type: IsA<File>> {
    const SUPPORT_THREAD_CONTEXT: bool = true;
Show 59 methods // Provided methods fn dup(&self) -> File { ... } fn hash(&self) -> u32 { ... } fn equal(&self, file2: &File) -> bool { ... } fn is_native(&self) -> bool { ... } fn has_uri_scheme(&self, uri_scheme: &str) -> bool { ... } fn uri_scheme(&self) -> Option<String> { ... } fn basename(&self) -> Option<PathBuf> { ... } fn path(&self) -> Option<PathBuf> { ... } fn uri(&self) -> String { ... } fn parse_name(&self) -> String { ... } fn parent(&self) -> Option<File> { ... } fn has_prefix(&self, prefix: &File) -> bool { ... } fn relative_path(&self, descendant: &File) -> Option<PathBuf> { ... } fn resolve_relative_path(&self, relative_path: impl AsRef<Path>) -> File { ... } fn child_for_display_name(&self, display_name: &str) -> Result<File, Error> { ... } fn enumerate_children( &self, attributes: &str, flags: FileQueryInfoFlags, cancellable: Option<&Cancellable>, ) -> Result<FileEnumerator, Error> { ... } fn query_info( &self, attributes: &str, flags: FileQueryInfoFlags, cancellable: Option<&Cancellable>, ) -> Result<FileInfo, Error> { ... } fn query_filesystem_info( &self, attributes: &str, cancellable: Option<&Cancellable>, ) -> Result<FileInfo, Error> { ... } fn find_enclosing_mount( &self, cancellable: Option<&Cancellable>, ) -> Result<Mount, Error> { ... } fn set_display_name( &self, display_name: &str, cancellable: Option<&Cancellable>, ) -> Result<File, Error> { ... } fn query_settable_attributes( &self, cancellable: Option<&Cancellable>, ) -> Result<FileAttributeInfoList, Error> { ... } fn query_writable_namespaces( &self, cancellable: Option<&Cancellable>, ) -> Result<FileAttributeInfoList, Error> { ... } fn set_attribute<'a>( &self, attribute: &str, value: impl Into<FileAttributeValue<'a>>, flags: FileQueryInfoFlags, cancellable: Option<&Cancellable>, ) -> Result<(), Error> { ... } fn set_attributes_from_info( &self, info: &FileInfo, flags: FileQueryInfoFlags, cancellable: Option<&Cancellable>, ) -> Result<(), Error> { ... } fn read_fn( &self, cancellable: Option<&Cancellable>, ) -> Result<FileInputStream, Error> { ... } fn append_to( &self, flags: FileCreateFlags, cancellable: Option<&Cancellable>, ) -> Result<FileOutputStream, Error> { ... } fn create( &self, flags: FileCreateFlags, cancellable: Option<&Cancellable>, ) -> Result<FileOutputStream, Error> { ... } fn replace( &self, etag: Option<&str>, make_backup: bool, flags: FileCreateFlags, cancellable: Option<&Cancellable>, ) -> Result<FileOutputStream, Error> { ... } fn delete(&self, cancellable: Option<&Cancellable>) -> Result<(), Error> { ... } fn trash(&self, cancellable: Option<&Cancellable>) -> Result<(), Error> { ... } fn make_directory( &self, cancellable: Option<&Cancellable>, ) -> Result<(), Error> { ... } fn make_symbolic_link( &self, symlink_value: impl AsRef<Path>, cancellable: Option<&Cancellable>, ) -> Result<(), Error> { ... } fn copy( source: &File, destination: &File, flags: FileCopyFlags, cancellable: Option<&Cancellable>, progress_callback: Option<&mut dyn FnMut(i64, i64)>, ) -> Result<(), Error> { ... } fn move_( source: &File, destination: &File, flags: FileCopyFlags, cancellable: Option<&Cancellable>, progress_callback: Option<&mut dyn FnMut(i64, i64)>, ) -> Result<(), Error> { ... } fn mount_mountable<P: FnOnce(&Self::Type, &AsyncResult) + 'static>( &self, flags: MountMountFlags, mount_operation: Option<&MountOperation>, cancellable: Option<&Cancellable>, callback: Option<P>, ) { ... } fn mount_mountable_finish(&self, res: &AsyncResult) -> Result<File, Error> { ... } fn unmount_mountable<P: FnOnce(&Self::Type, &AsyncResult) + 'static>( &self, flags: MountUnmountFlags, cancellable: Option<&Cancellable>, callback: Option<P>, ) { ... } fn unmount_mountable_finish(&self, res: &AsyncResult) -> Result<(), Error> { ... } fn eject_mountable<P: FnOnce(&Self::Type, &AsyncResult) + 'static>( &self, flags: MountUnmountFlags, cancellable: Option<&Cancellable>, callback: Option<P>, ) { ... } fn eject_mountable_finish(&self, res: &AsyncResult) -> Result<(), Error> { ... } fn mount_enclosing_volume<P: FnOnce(&Self::Type, &AsyncResult) + 'static>( &self, flags: MountMountFlags, mount_operation: Option<&MountOperation>, cancellable: Option<&Cancellable>, callback: Option<P>, ) { ... } fn mount_enclosing_volume_finish( &self, res: &AsyncResult, ) -> Result<(), Error> { ... } fn monitor_dir( &self, flags: FileMonitorFlags, cancellable: Option<&Cancellable>, ) -> Result<FileMonitor, Error> { ... } fn monitor_file( &self, flags: FileMonitorFlags, cancellable: Option<&Cancellable>, ) -> Result<FileMonitor, Error> { ... } fn open_readwrite( &self, cancellable: Option<&Cancellable>, ) -> Result<FileIOStream, Error> { ... } fn create_readwrite( &self, flags: FileCreateFlags, cancellable: Option<&Cancellable>, ) -> Result<FileIOStream, Error> { ... } fn replace_readwrite( &self, etag: Option<&str>, make_backup: bool, flags: FileCreateFlags, cancellable: Option<&Cancellable>, ) -> Result<FileIOStream, Error> { ... } fn start_mountable<P: FnOnce(&Self::Type, &AsyncResult) + 'static>( &self, flags: DriveStartFlags, mount_operation: Option<&MountOperation>, cancellable: Option<&Cancellable>, callback: Option<P>, ) { ... } fn start_mountable_finish(&self, res: &AsyncResult) -> Result<(), Error> { ... } fn stop_mountable<P: FnOnce(&Self::Type, &AsyncResult) + 'static>( &self, flags: MountUnmountFlags, mount_operation: Option<&MountOperation>, cancellable: Option<&Cancellable>, callback: Option<P>, ) { ... } fn stop_mountable_finish(&self, res: &AsyncResult) -> Result<(), Error> { ... } fn unmount_mountable_with_operation<P: FnOnce(&Self::Type, &AsyncResult) + 'static>( &self, flags: MountUnmountFlags, mount_operation: Option<&MountOperation>, cancellable: Option<&Cancellable>, callback: Option<P>, ) { ... } fn unmount_mountable_with_operation_finish( &self, res: &AsyncResult, ) -> Result<(), Error> { ... } fn eject_mountable_with_operation<P: FnOnce(&Self::Type, &AsyncResult) + 'static>( &self, flags: MountUnmountFlags, mount_operation: Option<&MountOperation>, cancellable: Option<&Cancellable>, callback: Option<P>, ) { ... } fn eject_mountable_with_operation_finish( &self, res: &AsyncResult, ) -> Result<(), Error> { ... } fn poll_mountable<P: FnOnce(&Self::Type, &AsyncResult) + 'static>( &self, cancellable: Option<&Cancellable>, callback: Option<P>, ) { ... } fn poll_mountable_finish(&self, res: &AsyncResult) -> Result<(), Error> { ... } fn measure_disk_usage( &self, flags: FileMeasureFlags, cancellable: Option<&Cancellable>, progress_callback: Option<&mut dyn FnMut(bool, u64, u64, u64)>, ) -> Result<(u64, u64, u64), Error> { ... } fn query_exists(&self, cancellable: Option<&Cancellable>) -> bool { ... }
}

Provided Associated Constants§

Provided Methods§

Source

fn dup(&self) -> File

Source

fn hash(&self) -> u32

Source

fn equal(&self, file2: &File) -> bool

Source

fn is_native(&self) -> bool

Source

fn has_uri_scheme(&self, uri_scheme: &str) -> bool

Source

fn uri_scheme(&self) -> Option<String>

Source

fn basename(&self) -> Option<PathBuf>

Source

fn path(&self) -> Option<PathBuf>

Source

fn uri(&self) -> String

Source

fn parse_name(&self) -> String

Source

fn parent(&self) -> Option<File>

Source

fn has_prefix(&self, prefix: &File) -> bool

Source

fn relative_path(&self, descendant: &File) -> Option<PathBuf>

Source

fn resolve_relative_path(&self, relative_path: impl AsRef<Path>) -> File

Source

fn child_for_display_name(&self, display_name: &str) -> Result<File, Error>

Source

fn enumerate_children( &self, attributes: &str, flags: FileQueryInfoFlags, cancellable: Option<&Cancellable>, ) -> Result<FileEnumerator, Error>

Source

fn query_info( &self, attributes: &str, flags: FileQueryInfoFlags, cancellable: Option<&Cancellable>, ) -> Result<FileInfo, Error>

Source

fn query_filesystem_info( &self, attributes: &str, cancellable: Option<&Cancellable>, ) -> Result<FileInfo, Error>

Source

fn find_enclosing_mount( &self, cancellable: Option<&Cancellable>, ) -> Result<Mount, Error>

Source

fn set_display_name( &self, display_name: &str, cancellable: Option<&Cancellable>, ) -> Result<File, Error>

Source

fn query_settable_attributes( &self, cancellable: Option<&Cancellable>, ) -> Result<FileAttributeInfoList, Error>

Source

fn query_writable_namespaces( &self, cancellable: Option<&Cancellable>, ) -> Result<FileAttributeInfoList, Error>

Source

fn set_attribute<'a>( &self, attribute: &str, value: impl Into<FileAttributeValue<'a>>, flags: FileQueryInfoFlags, cancellable: Option<&Cancellable>, ) -> Result<(), Error>

Source

fn set_attributes_from_info( &self, info: &FileInfo, flags: FileQueryInfoFlags, cancellable: Option<&Cancellable>, ) -> Result<(), Error>

Source

fn read_fn( &self, cancellable: Option<&Cancellable>, ) -> Result<FileInputStream, Error>

Source

fn append_to( &self, flags: FileCreateFlags, cancellable: Option<&Cancellable>, ) -> Result<FileOutputStream, Error>

Source

fn create( &self, flags: FileCreateFlags, cancellable: Option<&Cancellable>, ) -> Result<FileOutputStream, Error>

Source

fn replace( &self, etag: Option<&str>, make_backup: bool, flags: FileCreateFlags, cancellable: Option<&Cancellable>, ) -> Result<FileOutputStream, Error>

Source

fn delete(&self, cancellable: Option<&Cancellable>) -> Result<(), Error>

Source

fn trash(&self, cancellable: Option<&Cancellable>) -> Result<(), Error>

Source

fn make_directory(&self, cancellable: Option<&Cancellable>) -> Result<(), Error>

Source

fn copy( source: &File, destination: &File, flags: FileCopyFlags, cancellable: Option<&Cancellable>, progress_callback: Option<&mut dyn FnMut(i64, i64)>, ) -> Result<(), Error>

Source

fn move_( source: &File, destination: &File, flags: FileCopyFlags, cancellable: Option<&Cancellable>, progress_callback: Option<&mut dyn FnMut(i64, i64)>, ) -> Result<(), Error>

Source

fn mount_mountable<P: FnOnce(&Self::Type, &AsyncResult) + 'static>( &self, flags: MountMountFlags, mount_operation: Option<&MountOperation>, cancellable: Option<&Cancellable>, callback: Option<P>, )

Source

fn mount_mountable_finish(&self, res: &AsyncResult) -> Result<File, Error>

Source

fn unmount_mountable<P: FnOnce(&Self::Type, &AsyncResult) + 'static>( &self, flags: MountUnmountFlags, cancellable: Option<&Cancellable>, callback: Option<P>, )

Source

fn unmount_mountable_finish(&self, res: &AsyncResult) -> Result<(), Error>

Source

fn eject_mountable<P: FnOnce(&Self::Type, &AsyncResult) + 'static>( &self, flags: MountUnmountFlags, cancellable: Option<&Cancellable>, callback: Option<P>, )

Source

fn eject_mountable_finish(&self, res: &AsyncResult) -> Result<(), Error>

Source

fn mount_enclosing_volume<P: FnOnce(&Self::Type, &AsyncResult) + 'static>( &self, flags: MountMountFlags, mount_operation: Option<&MountOperation>, cancellable: Option<&Cancellable>, callback: Option<P>, )

Source

fn mount_enclosing_volume_finish(&self, res: &AsyncResult) -> Result<(), Error>

Source

fn monitor_dir( &self, flags: FileMonitorFlags, cancellable: Option<&Cancellable>, ) -> Result<FileMonitor, Error>

Source

fn monitor_file( &self, flags: FileMonitorFlags, cancellable: Option<&Cancellable>, ) -> Result<FileMonitor, Error>

Source

fn open_readwrite( &self, cancellable: Option<&Cancellable>, ) -> Result<FileIOStream, Error>

Source

fn create_readwrite( &self, flags: FileCreateFlags, cancellable: Option<&Cancellable>, ) -> Result<FileIOStream, Error>

Source

fn replace_readwrite( &self, etag: Option<&str>, make_backup: bool, flags: FileCreateFlags, cancellable: Option<&Cancellable>, ) -> Result<FileIOStream, Error>

Source

fn start_mountable<P: FnOnce(&Self::Type, &AsyncResult) + 'static>( &self, flags: DriveStartFlags, mount_operation: Option<&MountOperation>, cancellable: Option<&Cancellable>, callback: Option<P>, )

Source

fn start_mountable_finish(&self, res: &AsyncResult) -> Result<(), Error>

Source

fn stop_mountable<P: FnOnce(&Self::Type, &AsyncResult) + 'static>( &self, flags: MountUnmountFlags, mount_operation: Option<&MountOperation>, cancellable: Option<&Cancellable>, callback: Option<P>, )

Source

fn stop_mountable_finish(&self, res: &AsyncResult) -> Result<(), Error>

Source

fn unmount_mountable_with_operation<P: FnOnce(&Self::Type, &AsyncResult) + 'static>( &self, flags: MountUnmountFlags, mount_operation: Option<&MountOperation>, cancellable: Option<&Cancellable>, callback: Option<P>, )

Source

fn unmount_mountable_with_operation_finish( &self, res: &AsyncResult, ) -> Result<(), Error>

Source

fn eject_mountable_with_operation<P: FnOnce(&Self::Type, &AsyncResult) + 'static>( &self, flags: MountUnmountFlags, mount_operation: Option<&MountOperation>, cancellable: Option<&Cancellable>, callback: Option<P>, )

Source

fn eject_mountable_with_operation_finish( &self, res: &AsyncResult, ) -> Result<(), Error>

Source

fn poll_mountable<P: FnOnce(&Self::Type, &AsyncResult) + 'static>( &self, cancellable: Option<&Cancellable>, callback: Option<P>, )

Source

fn poll_mountable_finish(&self, res: &AsyncResult) -> Result<(), Error>

Source

fn measure_disk_usage( &self, flags: FileMeasureFlags, cancellable: Option<&Cancellable>, progress_callback: Option<&mut dyn FnMut(bool, u64, u64, u64)>, ) -> Result<(u64, u64, u64), Error>

Source

fn query_exists(&self, cancellable: Option<&Cancellable>) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§