Skip to main content

ferroui_base/platform/storage/
i_storage_bookmark_item.rs

1use super::{IStorageFile, IStorageFolder, IStorageItem};
2use crate::input::LocalBoxFuture;
3
4/// A storage item that is backed by an entry of the local file system.
5///
6/// This is an implementation detail of the storage providers.
7///
8/// Upstream exposes the file-system info of the entry; the only thing the
9/// contracts read from it is its full name.
10pub trait IStorageItemWithFileSystemInfo: IStorageItem {
11    /// The full path of the file-system entry (C# `FileSystemInfo.FullName`).
12    fn file_system_info_full_name(&self) -> String;
13}
14
15/// A storage item that was opened from a bookmark.
16///
17/// This interface is not meant to be implemented by applications.
18pub trait IStorageBookmarkItem: IStorageItem {
19    /// Releases the bookmark the item was opened from.
20    fn release_bookmark_async(&self) -> LocalBoxFuture<()>;
21}
22
23/// A file that was opened from a bookmark.
24///
25/// This interface is not meant to be implemented by applications.
26pub trait IStorageBookmarkFile: IStorageFile + IStorageBookmarkItem {}
27
28/// A folder that was opened from a bookmark.
29///
30/// This interface is not meant to be implemented by applications.
31pub trait IStorageBookmarkFolder: IStorageFolder + IStorageBookmarkItem {}