FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IStorageProvider

    trait · ferroui-base · v0.5.0

    trait IStorageProvider
    

    Opens file and folder pickers and gives access to storage items.

    The picker operations fail with an I/O error when no picker can be shown.

    This interface is not meant to be implemented by applications.

    View source

    Members

    can_open

    fn can_open(self: &Self) -> bool
    

    Returns true if it is possible to open a file picker on the current platform.

    Source

    open_file_picker_async

    fn open_file_picker_async(self: &Self, options: FilePickerOpenOptions) -> LocalBoxFuture<std::io::Result<Vec<Rc<dyn IStorageFile>>>>
    

    Opens a file picker dialog.

    Resolves to the list of files, empty if the user canceled the dialog.

    Source

    open_file_picker_with_result_async

    fn open_file_picker_with_result_async(self: &Self, options: FilePickerOpenOptions) -> LocalBoxFuture<std::io::Result<OpenFilePickerResult>>
    

    Opens a file picker dialog and returns the selected files along with additional information.

    This method allows retrieving additional details about the picked files, such as the selected file type.

    Source

    can_save

    fn can_save(self: &Self) -> bool
    

    Returns true if it is possible to open a save file picker on the current platform.

    Source

    save_file_picker_async

    fn save_file_picker_async(self: &Self, options: FilePickerSaveOptions) -> LocalBoxFuture<std::io::Result<Option<Rc<dyn IStorageFile>>>>
    

    Opens a save file picker dialog.

    Resolves to the saved IStorageFile, or None if the user canceled the dialog.

    Source

    save_file_picker_with_result_async

    fn save_file_picker_with_result_async(self: &Self, options: FilePickerSaveOptions) -> LocalBoxFuture<std::io::Result<SaveFilePickerResult>>
    

    Opens a save file picker dialog and returns the selected file along with additional information.

    This method allows retrieving additional details about the saved file, such as the selected file type.

    Source

    can_pick_folder

    fn can_pick_folder(self: &Self) -> bool
    

    Returns true if it is possible to open a folder picker on the current platform.

    Source

    open_folder_picker_async

    fn open_folder_picker_async(self: &Self, options: FolderPickerOpenOptions) -> LocalBoxFuture<std::io::Result<Vec<Rc<dyn IStorageFolder>>>>
    

    Opens a folder picker dialog.

    Resolves to the list of folders, empty if the user canceled the dialog.

    Source

    open_file_bookmark_async

    fn open_file_bookmark_async(self: &Self, bookmark: &str) -> LocalBoxFuture<Option<Rc<dyn IStorageBookmarkFile>>>
    

    Opens an IStorageBookmarkFile from the bookmark ID.

    Resolves to the bookmarked file, or None if the OS denied the request or the bookmark is invalid.

    Source

    open_folder_bookmark_async

    fn open_folder_bookmark_async(self: &Self, bookmark: &str) -> LocalBoxFuture<Option<Rc<dyn IStorageBookmarkFolder>>>
    

    Opens an IStorageBookmarkFolder from the bookmark ID.

    Resolves to the bookmarked folder, or None if the OS denied the request or the bookmark is invalid.

    Source

    try_get_file_from_path_async

    fn try_get_file_from_path_async(self: &Self, file_path: &Url) -> LocalBoxFuture<Option<Rc<dyn IStorageFile>>>
    

    Attempts to read a file from the file-system by its path.

    file_path is the path of the item to retrieve in URI format.

    The URI must be an absolute path. It also might ask the user for a permission, and resolve to None if it was denied.

    Source

    try_get_folder_from_path_async

    fn try_get_folder_from_path_async(self: &Self, folder_path: &Url) -> LocalBoxFuture<Option<Rc<dyn IStorageFolder>>>
    

    Attempts to read a folder from the file-system by its path.

    folder_path is the path of the folder to retrieve in URI format.

    The URI must be an absolute path. It also might ask the user for a permission, and resolve to None if it was denied.

    Source

    try_get_well_known_folder_async

    fn try_get_well_known_folder_async(self: &Self, well_known_folder: WellKnownFolder) -> LocalBoxFuture<Option<Rc<dyn IStorageFolder>>>
    

    Attempts to read a folder from the file-system by its well-known folder identifier.

    Source

    is_file_system_backed

    fn is_file_system_backed(self: &Self) -> bool
    

    Whether the provider is the file-system backed one (C# provider is BclStorageProvider).

    Answered with true by the implementations of BclStorageProvider.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.