Trait gio::FileExt[][src]

pub trait FileExt {
    fn append_to<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        flags: FileCreateFlags,
        cancellable: P
    ) -> Result<FileOutputStream, Error>;
fn append_to_async<'a, P: Into<Option<&'a Cancellable>>, Q: FnOnce(Result<FileOutputStream, Error>) + Send + 'static>(
        &self,
        flags: FileCreateFlags,
        io_priority: Priority,
        cancellable: P,
        callback: Q
    );
fn create<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        flags: FileCreateFlags,
        cancellable: P
    ) -> Result<FileOutputStream, Error>;
fn create_async<'a, P: Into<Option<&'a Cancellable>>, Q: FnOnce(Result<FileOutputStream, Error>) + Send + 'static>(
        &self,
        flags: FileCreateFlags,
        io_priority: Priority,
        cancellable: P,
        callback: Q
    );
fn create_readwrite<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        flags: FileCreateFlags,
        cancellable: P
    ) -> Result<FileIOStream, Error>;
fn create_readwrite_async<'a, P: Into<Option<&'a Cancellable>>, Q: FnOnce(Result<FileIOStream, Error>) + Send + 'static>(
        &self,
        flags: FileCreateFlags,
        io_priority: Priority,
        cancellable: P,
        callback: Q
    );
fn delete<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        cancellable: P
    ) -> Result<(), Error>;
fn dup(&self) -> Option<File>;
fn equal<P: IsA<File>>(&self, file2: &P) -> bool;
fn get_basename(&self) -> Option<PathBuf>;
fn get_child<P: AsRef<Path>>(&self, name: P) -> Option<File>;
fn get_child_for_display_name(
        &self,
        display_name: &str
    ) -> Result<File, Error>;
fn get_parent(&self) -> Option<File>;
fn get_parse_name(&self) -> Option<String>;
fn get_path(&self) -> Option<PathBuf>;
fn get_relative_path<P: IsA<File>>(&self, descendant: &P) -> Option<PathBuf>;
fn get_uri(&self) -> Option<String>;
fn get_uri_scheme(&self) -> Option<String>;
fn has_parent<'a, P: IsA<File> + 'a, Q: Into<Option<&'a P>>>(
        &self,
        parent: Q
    ) -> bool;
fn has_prefix<P: IsA<File>>(&self, prefix: &P) -> bool;
fn has_uri_scheme(&self, uri_scheme: &str) -> bool;
fn is_native(&self) -> bool;
fn load_contents<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        cancellable: P
    ) -> Result<(Vec<u8>, String), Error>;
fn load_contents_async<'a, P: Into<Option<&'a Cancellable>>, Q: FnOnce(Result<(Vec<u8>, String), Error>) + Send + 'static>(
        &self,
        cancellable: P,
        callback: Q
    );
fn make_directory<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        cancellable: P
    ) -> Result<(), Error>;
fn make_directory_with_parents<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        cancellable: P
    ) -> Result<(), Error>;
fn make_symbolic_link<'a, P: AsRef<Path>, Q: Into<Option<&'a Cancellable>>>(
        &self,
        symlink_value: P,
        cancellable: Q
    ) -> Result<(), Error>;
fn open_readwrite<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        cancellable: P
    ) -> Result<FileIOStream, Error>;
fn open_readwrite_async<'a, P: Into<Option<&'a Cancellable>>, Q: FnOnce(Result<FileIOStream, Error>) + Send + 'static>(
        &self,
        io_priority: Priority,
        cancellable: P,
        callback: Q
    );
fn query_default_handler<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        cancellable: P
    ) -> Result<AppInfo, Error>;
fn query_exists<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        cancellable: P
    ) -> bool;
fn query_file_type<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        flags: FileQueryInfoFlags,
        cancellable: P
    ) -> FileType;
fn query_filesystem_info<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        attributes: &str,
        cancellable: P
    ) -> Result<FileInfo, Error>;
fn query_filesystem_info_async<'a, P: Into<Option<&'a Cancellable>>, Q: FnOnce(Result<FileInfo, Error>) + Send + 'static>(
        &self,
        attributes: &str,
        io_priority: Priority,
        cancellable: P,
        callback: Q
    );
fn query_info<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        attributes: &str,
        flags: FileQueryInfoFlags,
        cancellable: P
    ) -> Result<FileInfo, Error>;
fn query_info_async<'a, P: Into<Option<&'a Cancellable>>, Q: FnOnce(Result<FileInfo, Error>) + Send + 'static>(
        &self,
        attributes: &str,
        flags: FileQueryInfoFlags,
        io_priority: Priority,
        cancellable: P,
        callback: Q
    );
fn read<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        cancellable: P
    ) -> Result<FileInputStream, Error>;
fn read_async<'a, P: Into<Option<&'a Cancellable>>, Q: FnOnce(Result<FileInputStream, Error>) + Send + 'static>(
        &self,
        io_priority: Priority,
        cancellable: P,
        callback: Q
    );
fn replace<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b Cancellable>>>(
        &self,
        etag: P,
        make_backup: bool,
        flags: FileCreateFlags,
        cancellable: Q
    ) -> Result<FileOutputStream, Error>;
fn replace_async<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b Cancellable>>, R: FnOnce(Result<FileOutputStream, Error>) + Send + 'static>(
        &self,
        etag: P,
        make_backup: bool,
        flags: FileCreateFlags,
        io_priority: Priority,
        cancellable: Q,
        callback: R
    );
fn replace_contents<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b Cancellable>>>(
        &self,
        contents: &[u8],
        etag: P,
        make_backup: bool,
        flags: FileCreateFlags,
        cancellable: Q
    ) -> Result<String, Error>;
fn replace_contents_async<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b Cancellable>>, R: FnOnce(Result<String, Error>) + Send + 'static>(
        &self,
        contents: &[u8],
        etag: P,
        make_backup: bool,
        flags: FileCreateFlags,
        cancellable: Q,
        callback: R
    );
fn replace_readwrite<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b Cancellable>>>(
        &self,
        etag: P,
        make_backup: bool,
        flags: FileCreateFlags,
        cancellable: Q
    ) -> Result<FileIOStream, Error>;
fn replace_readwrite_async<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b Cancellable>>, R: FnOnce(Result<FileIOStream, Error>) + Send + 'static>(
        &self,
        etag: P,
        make_backup: bool,
        flags: FileCreateFlags,
        io_priority: Priority,
        cancellable: Q,
        callback: R
    );
fn resolve_relative_path<P: AsRef<Path>>(
        &self,
        relative_path: P
    ) -> Option<File>;
fn set_attribute_byte_string<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        attribute: &str,
        value: &str,
        flags: FileQueryInfoFlags,
        cancellable: P
    ) -> Result<(), Error>;
fn set_attribute_int32<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        attribute: &str,
        value: i32,
        flags: FileQueryInfoFlags,
        cancellable: P
    ) -> Result<(), Error>;
fn set_attribute_int64<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        attribute: &str,
        value: i64,
        flags: FileQueryInfoFlags,
        cancellable: P
    ) -> Result<(), Error>;
fn set_attribute_string<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        attribute: &str,
        value: &str,
        flags: FileQueryInfoFlags,
        cancellable: P
    ) -> Result<(), Error>;
fn set_attribute_uint32<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        attribute: &str,
        value: u32,
        flags: FileQueryInfoFlags,
        cancellable: P
    ) -> Result<(), Error>;
fn set_attribute_uint64<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        attribute: &str,
        value: u64,
        flags: FileQueryInfoFlags,
        cancellable: P
    ) -> Result<(), Error>;
fn set_attributes_async<'a, P: Into<Option<&'a Cancellable>>, Q: FnOnce(Result<FileInfo, Error>) + Send + 'static>(
        &self,
        info: &FileInfo,
        flags: FileQueryInfoFlags,
        io_priority: Priority,
        cancellable: P,
        callback: Q
    );
fn set_attributes_from_info<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        info: &FileInfo,
        flags: FileQueryInfoFlags,
        cancellable: P
    ) -> Result<(), Error>;
fn set_display_name<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        display_name: &str,
        cancellable: P
    ) -> Result<File, Error>;
fn set_display_name_async<'a, P: Into<Option<&'a Cancellable>>, Q: FnOnce(Result<File, Error>) + Send + 'static>(
        &self,
        display_name: &str,
        io_priority: Priority,
        cancellable: P,
        callback: Q
    );
fn supports_thread_contexts(&self) -> bool;
fn trash<'a, P: Into<Option<&'a Cancellable>>>(
        &self,
        cancellable: P
    ) -> Result<(), Error>; }

Required Methods

Implementors