IStorageItem
trait · ferroui-base · v0.5.0
trait IStorageItem: IDisposable
Manipulates storage items (files and folders) and their contents, and provides information about them.
This interface inherits IDisposable. It is recommended to dispose an
item when it is not used anymore.
This interface is not meant to be implemented by applications.
Members
namepathget_basic_properties_asynccan_bookmarksave_bookmark_asyncget_parent_asyncdelete_asyncmove_asyncas_storage_fileas_storage_folderas_storage_item_with_file_system_infoas_any
name
fn name(self: &Self) -> String
The name of the item including the file name extension if there is one.
path
fn path(self: &Self) -> UriRef
The file-system path of the item.
Android backend might return a file path with "content:" scheme.
Browser and iOS backends might return a relative URI, and so does the
root of a local file system: the path is a UriRef, whose
as_url is the URL of an absolute one.
get_basic_properties_async
fn get_basic_properties_async(self: &Self) -> LocalBoxFuture<StorageItemProperties>
Gets the basic properties of the current item.
can_bookmark
fn can_bookmark(self: &Self) -> bool
Returns true if it is possible to bookmark this file or folder for
future access.
save_bookmark_async
fn save_bookmark_async(self: &Self) -> LocalBoxFuture<Option<String>>
Saves a bookmark for this file or folder.
Resolves to an identifier of the bookmark, or None if a bookmark
cannot be created.
get_parent_async
fn get_parent_async(self: &Self) -> LocalBoxFuture<Option<Rc<dyn IStorageFolder>>>
Gets the parent folder of the current storage item.
delete_async
fn delete_async(self: &Self) -> LocalBoxFuture<std::io::Result<()>>
Deletes the current storage item and its contents.
move_async
fn move_async(self: &Self, destination: Rc<dyn IStorageFolder>) -> LocalBoxFuture<std::io::Result<Option<Rc<dyn IStorageItem>>>>
Moves the current storage item and its contents to an
IStorageFolder.
Resolves to the storage item at its new location, if the platform can provide it.
as_storage_file
fn as_storage_file(self: Rc<Self>) -> Option<Rc<dyn IStorageFile>>
The item as a file, if it is one (C# item as IStorageFile).
as_storage_folder
fn as_storage_folder(self: Rc<Self>) -> Option<Rc<dyn IStorageFolder>>
The item as a folder, if it is one (C# item as IStorageFolder).
as_storage_item_with_file_system_info
fn as_storage_item_with_file_system_info(self: &Self) -> Option<&dyn IStorageItemWithFileSystemInfo>
The item as one that is backed by an entry of the local file system, if it is one.
as_any
fn as_any(self: &Self) -> Option<&dyn Any>
The item as its concrete type, for a storage provider that
recognises its own items (C# item as JSStorageItem). None unless
the implementation opts in.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.