Skip to main content

AsyncPathExt

Trait AsyncPathExt 

Source
pub trait AsyncPathExt<T: PathExt>: Future<Output = Result<T>> + Send {
Show 76 methods // Required methods fn metadata_async(self) -> impl Future<Output = Result<Metadata>> + Send; fn symlink_metadata_async( self, ) -> impl Future<Output = Result<Metadata>> + Send; fn canonicalize_async(self) -> impl Future<Output = Result<PathBuf>> + Send; fn read_link_async(self) -> impl Future<Output = Result<PathBuf>> + Send; fn read_dir_async(self) -> impl Future<Output = Result<ReadDir>> + Send; fn try_exists_async(self) -> impl Future<Output = Result<bool>> + Send; fn try_is_file(self) -> impl Future<Output = Result<bool>> + Send; fn try_is_dir(self) -> impl Future<Output = Result<bool>> + Send; fn try_is_symlink(self) -> impl Future<Output = Result<bool>> + Send; fn metadata_if_exists( self, ) -> impl Future<Output = Result<Option<Metadata>>> + Send; fn symlink_metadata_if_exists( self, ) -> impl Future<Output = Result<Option<Metadata>>> + Send; fn canonicalize_if_exists( self, ) -> impl Future<Output = Result<Option<PathBuf>>> + Send; fn read_link_if_exists( self, ) -> impl Future<Output = Result<Option<PathBuf>>> + Send; fn read_dir_if_exists( self, ) -> impl Future<Output = Result<Option<ReadDir>>> + Send; fn try_exists_nofollow(self) -> impl Future<Output = Result<bool>> + Send; fn try_is_file_nofollow(self) -> impl Future<Output = Result<bool>> + Send; fn try_is_dir_nofollow(self) -> impl Future<Output = Result<bool>> + Send; fn try_is_read_dir_empty(self) -> impl Future<Output = Result<bool>> + Send; fn try_is_read_dir_empty_if_exists( self, ) -> impl Future<Output = Result<Option<bool>>> + Send; fn create_new(self) -> impl Future<Output = Result<File>> + Send; fn create_new_if_not_exists( self, ) -> impl Future<Output = Result<Option<File>>> + Send; fn create(self) -> impl Future<Output = Result<File>> + Send; fn create_if_not_exists( self, ) -> impl Future<Output = Result<Option<File>>> + Send; fn open(self) -> impl Future<Output = Result<File>> + Send; fn open_if_exists(self) -> impl Future<Output = Result<Option<File>>> + Send; fn read(self) -> impl Future<Output = Result<Vec<u8>>> + Send; fn read_if_exists( self, ) -> impl Future<Output = Result<Option<Vec<u8>>>> + Send; fn read_to_string(self) -> impl Future<Output = Result<String>> + Send; fn read_to_string_if_exists( self, ) -> impl Future<Output = Result<Option<String>>> + Send; fn read_lines( self, ) -> impl Future<Output = Result<Lines<BufReader<File>>>> + Send; fn read_lines_if_exists( self, ) -> impl Future<Output = Result<Option<Lines<BufReader<File>>>>> + Send; fn create_dir_all(self) -> impl Future<Output = Result<T>> + Send; fn create_dir(self) -> impl Future<Output = Result<T>> + Send; fn create_dir_if_not_exists( self, ) -> impl Future<Output = Result<Option<T>>> + Send; fn write_new( self, contents: impl AsRef<[u8]> + Send, ) -> impl Future<Output = Result<T>> + Send; fn write_new_if_not_exists( self, contents: impl AsRef<[u8]> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send; fn write( self, contents: impl AsRef<[u8]> + Send, ) -> impl Future<Output = Result<T>> + Send; fn write_if_exists( self, contents: impl AsRef<[u8]> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send; fn append( self, contents: impl AsRef<[u8]> + Send, ) -> impl Future<Output = Result<T>> + Send; fn append_if_exists( self, contents: impl AsRef<[u8]> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send; fn copy( self, to: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<T>> + Send; fn copy_if_exists( self, to: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send; fn rename( self, to: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<T>> + Send; fn rename_if_exists( self, to: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send; fn remove_file(self) -> impl Future<Output = Result<T>> + Send; fn remove_file_if_exists( self, ) -> impl Future<Output = Result<Option<T>>> + Send; fn remove_dir(self) -> impl Future<Output = Result<T>> + Send; fn remove_dir_if_exists( self, ) -> impl Future<Output = Result<Option<T>>> + Send; fn remove_dir_all(self) -> impl Future<Output = Result<T>> + Send; fn remove_dir_all_if_exists( self, ) -> impl Future<Output = Result<Option<T>>> + Send; fn hard_link( self, link: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<T>> + Send; fn hard_link_if_exists( self, link: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send; fn hard_link_atomic( self, link: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<T>> + Send; fn hard_link_atomic_if_exists( self, link: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send; fn symlink( self, link: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<T>> + Send; fn symlink_atomic( self, link: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<T>> + Send; fn symlink_absolute( self, link: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<T>> + Send; fn symlink_absolute_atomic( self, link: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<T>> + Send; fn symlink_relative( self, link: impl AsRef<Path> + Send + Sync, ) -> impl Future<Output = Result<T>> + Send; fn symlink_relative_atomic( self, link: impl AsRef<Path> + Send + Sync, ) -> impl Future<Output = Result<T>> + Send; fn set_permissions( self, perm: Permissions, ) -> impl Future<Output = Result<T>> + Send; fn set_permissions_if_exists( self, perm: Permissions, ) -> impl Future<Output = Result<Option<T>>> + Send; fn set_permissions_readonly( self, readonly: bool, ) -> impl Future<Output = Result<T>> + Send; fn set_permissions_readonly_if_exists( self, readonly: bool, ) -> impl Future<Output = Result<Option<T>>> + Send; fn set_permissions_mode( self, mode: u32, ) -> impl Future<Output = Result<T>> + Send; fn set_permissions_mode_if_exists( self, mode: u32, ) -> impl Future<Output = Result<Option<T>>> + Send; fn add_permissions_mode( self, mode: u32, ) -> impl Future<Output = Result<T>> + Send; fn add_permissions_mode_if_exists( self, mode: u32, ) -> impl Future<Output = Result<Option<T>>> + Send; fn remove_permissions_mode( self, mode: u32, ) -> impl Future<Output = Result<T>> + Send; fn remove_permissions_mode_if_exists( self, mode: u32, ) -> impl Future<Output = Result<Option<T>>> + Send; fn chown( self, uid: Option<u32>, gid: Option<u32>, ) -> impl Future<Output = Result<T>> + Send; fn chown_if_exists( self, uid: Option<u32>, gid: Option<u32>, ) -> impl Future<Output = Result<Option<T>>> + Send; fn chown_nofollow( self, uid: Option<u32>, gid: Option<u32>, ) -> impl Future<Output = Result<T>> + Send; fn chown_nofollow_if_exists( self, uid: Option<u32>, gid: Option<u32>, ) -> impl Future<Output = Result<Option<T>>> + Send; fn chroot(self) -> impl Future<Output = Result<T>> + Send; fn chroot_if_exists(self) -> impl Future<Output = Result<Option<T>>> + Send;
}
Available on crate feature tokio only.

Required Methods§

Source

fn metadata_async(self) -> impl Future<Output = Result<Metadata>> + Send

Source

fn canonicalize_async(self) -> impl Future<Output = Result<PathBuf>> + Send

Source

fn read_dir_async(self) -> impl Future<Output = Result<ReadDir>> + Send

Source

fn try_exists_async(self) -> impl Future<Output = Result<bool>> + Send

Source

fn try_is_file(self) -> impl Future<Output = Result<bool>> + Send

Source

fn try_is_dir(self) -> impl Future<Output = Result<bool>> + Send

Source

fn metadata_if_exists( self, ) -> impl Future<Output = Result<Option<Metadata>>> + Send

Source

fn canonicalize_if_exists( self, ) -> impl Future<Output = Result<Option<PathBuf>>> + Send

Source

fn read_dir_if_exists( self, ) -> impl Future<Output = Result<Option<ReadDir>>> + Send

Source

fn try_exists_nofollow(self) -> impl Future<Output = Result<bool>> + Send

Source

fn try_is_file_nofollow(self) -> impl Future<Output = Result<bool>> + Send

Source

fn try_is_dir_nofollow(self) -> impl Future<Output = Result<bool>> + Send

Source

fn try_is_read_dir_empty(self) -> impl Future<Output = Result<bool>> + Send

Source

fn try_is_read_dir_empty_if_exists( self, ) -> impl Future<Output = Result<Option<bool>>> + Send

Source

fn create_new(self) -> impl Future<Output = Result<File>> + Send

Source

fn create_new_if_not_exists( self, ) -> impl Future<Output = Result<Option<File>>> + Send

Source

fn create(self) -> impl Future<Output = Result<File>> + Send

Source

fn create_if_not_exists( self, ) -> impl Future<Output = Result<Option<File>>> + Send

Source

fn open(self) -> impl Future<Output = Result<File>> + Send

Source

fn open_if_exists(self) -> impl Future<Output = Result<Option<File>>> + Send

Source

fn read(self) -> impl Future<Output = Result<Vec<u8>>> + Send

Source

fn read_if_exists(self) -> impl Future<Output = Result<Option<Vec<u8>>>> + Send

Source

fn read_to_string(self) -> impl Future<Output = Result<String>> + Send

Source

fn read_to_string_if_exists( self, ) -> impl Future<Output = Result<Option<String>>> + Send

Source

fn read_lines( self, ) -> impl Future<Output = Result<Lines<BufReader<File>>>> + Send

Source

fn read_lines_if_exists( self, ) -> impl Future<Output = Result<Option<Lines<BufReader<File>>>>> + Send

Source

fn create_dir_all(self) -> impl Future<Output = Result<T>> + Send

Source

fn create_dir(self) -> impl Future<Output = Result<T>> + Send

Source

fn create_dir_if_not_exists( self, ) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn write_new( self, contents: impl AsRef<[u8]> + Send, ) -> impl Future<Output = Result<T>> + Send

Source

fn write_new_if_not_exists( self, contents: impl AsRef<[u8]> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn write( self, contents: impl AsRef<[u8]> + Send, ) -> impl Future<Output = Result<T>> + Send

Source

fn write_if_exists( self, contents: impl AsRef<[u8]> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn append( self, contents: impl AsRef<[u8]> + Send, ) -> impl Future<Output = Result<T>> + Send

Source

fn append_if_exists( self, contents: impl AsRef<[u8]> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn copy( self, to: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<T>> + Send

Source

fn copy_if_exists( self, to: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn rename( self, to: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<T>> + Send

Source

fn rename_if_exists( self, to: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn remove_file(self) -> impl Future<Output = Result<T>> + Send

Source

fn remove_file_if_exists(self) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn remove_dir(self) -> impl Future<Output = Result<T>> + Send

Source

fn remove_dir_if_exists(self) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn remove_dir_all(self) -> impl Future<Output = Result<T>> + Send

Source

fn remove_dir_all_if_exists( self, ) -> impl Future<Output = Result<Option<T>>> + Send

Available on Unix only.
Available on Unix only.
Available on Unix only.
Available on Unix only.
Available on Unix only.
Available on Unix only.
Source

fn set_permissions( self, perm: Permissions, ) -> impl Future<Output = Result<T>> + Send

Source

fn set_permissions_if_exists( self, perm: Permissions, ) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn set_permissions_readonly( self, readonly: bool, ) -> impl Future<Output = Result<T>> + Send

Source

fn set_permissions_readonly_if_exists( self, readonly: bool, ) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn set_permissions_mode( self, mode: u32, ) -> impl Future<Output = Result<T>> + Send

Available on Unix only.
Source

fn set_permissions_mode_if_exists( self, mode: u32, ) -> impl Future<Output = Result<Option<T>>> + Send

Available on Unix only.
Source

fn add_permissions_mode( self, mode: u32, ) -> impl Future<Output = Result<T>> + Send

Available on Unix only.
Source

fn add_permissions_mode_if_exists( self, mode: u32, ) -> impl Future<Output = Result<Option<T>>> + Send

Available on Unix only.
Source

fn remove_permissions_mode( self, mode: u32, ) -> impl Future<Output = Result<T>> + Send

Available on Unix only.
Source

fn remove_permissions_mode_if_exists( self, mode: u32, ) -> impl Future<Output = Result<Option<T>>> + Send

Available on Unix only.
Source

fn chown( self, uid: Option<u32>, gid: Option<u32>, ) -> impl Future<Output = Result<T>> + Send

Available on Unix only.
Source

fn chown_if_exists( self, uid: Option<u32>, gid: Option<u32>, ) -> impl Future<Output = Result<Option<T>>> + Send

Available on Unix only.
Source

fn chown_nofollow( self, uid: Option<u32>, gid: Option<u32>, ) -> impl Future<Output = Result<T>> + Send

Available on Unix only.
Source

fn chown_nofollow_if_exists( self, uid: Option<u32>, gid: Option<u32>, ) -> impl Future<Output = Result<Option<T>>> + Send

Available on Unix only.
Source

fn chroot(self) -> impl Future<Output = Result<T>> + Send

Available on Unix and non-Fuchsia only.
Source

fn chroot_if_exists(self) -> impl Future<Output = Result<Option<T>>> + Send

Available on Unix and non-Fuchsia only.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: PathExt, F: Future<Output = Result<T>> + Send> AsyncPathExt<T> for F