Trait gio::prelude::FileExtManual
source · [−]pub trait FileExtManual: Sized {
fn replace_contents_async<B: AsRef<[u8]> + Send + 'static, R: FnOnce(Result<(B, 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, GString), (B, Error)>> + 'static>>;
fn enumerate_children_async<P: IsA<Cancellable>, Q: FnOnce(Result<FileEnumerator, Error>) + 'static>(
&self,
attributes: &'static str,
flags: FileQueryInfoFlags,
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
);
fn enumerate_children_future(
&self,
attributes: &'static str,
flags: FileQueryInfoFlags,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<FileEnumerator, Error>> + 'static>>;
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>>);
fn load_partial_contents_async<P: FnMut(&[u8]) -> bool + 'static, Q: FnOnce(Result<(Vec<u8>, Option<GString>), Error>) + 'static>(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
read_more_callback: P,
callback: Q
);
fn measure_disk_usage(
&self,
flags: FileMeasureFlags,
cancellable: Option<&impl IsA<Cancellable>>,
progress_callback: Option<Box<dyn FnMut(bool, u64, u64, u64) + 'static>>
) -> Result<(u64, u64, u64), Error>;
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>>);
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_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>>);
}
Required Methods
sourcefn replace_contents_async<B: AsRef<[u8]> + Send + 'static, R: FnOnce(Result<(B, GString), (B, Error)>) + 'static, C: IsA<Cancellable>>(
fn replace_contents_async<B: AsRef<[u8]> + Send + 'static, R: FnOnce(Result<(B, GString), (B, Error)>) + 'static, C: IsA<Cancellable>>(
&self,
contents: B,
etag: Option<&str>,
make_backup: bool,
flags: FileCreateFlags,
cancellable: Option<&C>,
callback: R
)
sourcefn replace_contents_future<B: AsRef<[u8]> + Send + 'static>(
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, GString), (B, Error)>> + 'static>>
sourcefn enumerate_children_async<P: IsA<Cancellable>, Q: FnOnce(Result<FileEnumerator, Error>) + 'static>(
fn enumerate_children_async<P: IsA<Cancellable>, Q: FnOnce(Result<FileEnumerator, Error>) + 'static>(
&self,
attributes: &'static str,
flags: FileQueryInfoFlags,
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
)
sourcefn enumerate_children_future(
fn enumerate_children_future(
&self,
attributes: &'static str,
flags: FileQueryInfoFlags,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<FileEnumerator, Error>> + 'static>>
sourcefn copy_async<Q: FnOnce(Result<(), Error>) + 'static>(
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
)
sourcefn copy_future(
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>>)
sourcefn load_partial_contents_async<P: FnMut(&[u8]) -> bool + 'static, Q: FnOnce(Result<(Vec<u8>, Option<GString>), Error>) + 'static>(
fn load_partial_contents_async<P: FnMut(&[u8]) -> bool + 'static, Q: FnOnce(Result<(Vec<u8>, Option<GString>), Error>) + 'static>(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
read_more_callback: P,
callback: Q
)
sourcefn measure_disk_usage(
fn measure_disk_usage(
&self,
flags: FileMeasureFlags,
cancellable: Option<&impl IsA<Cancellable>>,
progress_callback: Option<Box<dyn FnMut(bool, u64, u64, u64) + 'static>>
) -> Result<(u64, u64, u64), Error>
sourcefn measure_disk_usage_async<P: FnOnce(Result<(u64, u64, u64), Error>) + 'static>(
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
)
sourcefn measure_disk_usage_future(
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>>)
Available on crate feature
v2_72
only.