# IStorageItem

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/platform/storage/trait-istorageitem/

**trait** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
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.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/storage/i_storage_item.rs#L15)

## Members

- [`name`](#function-name)
- [`path`](#function-path)
- [`get_basic_properties_async`](#function-get_basic_properties_async)
- [`can_bookmark`](#function-can_bookmark)
- [`save_bookmark_async`](#function-save_bookmark_async)
- [`get_parent_async`](#function-get_parent_async)
- [`delete_async`](#function-delete_async)
- [`move_async`](#function-move_async)
- [`as_storage_file`](#function-as_storage_file)
- [`as_storage_folder`](#function-as_storage_folder)
- [`as_storage_item_with_file_system_info`](#function-as_storage_item_with_file_system_info)
- [`as_any`](#function-as_any)

<a id="function-name"></a>

### name

```rust
fn name(self: &Self) -> String
```

The name of the item including the file name extension if there is
one.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/storage/i_storage_item.rs#L18)

<a id="function-path"></a>

### path

```rust
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.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/storage/i_storage_item.rs#L26)

<a id="function-get_basic_properties_async"></a>

### get_basic_properties_async

```rust
fn get_basic_properties_async(self: &Self) -> LocalBoxFuture<StorageItemProperties>
```

Gets the basic properties of the current item.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/storage/i_storage_item.rs#L29)

<a id="function-can_bookmark"></a>

### can_bookmark

```rust
fn can_bookmark(self: &Self) -> bool
```

Returns `true` if it is possible to bookmark this file or folder for
future access.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/storage/i_storage_item.rs#L33)

<a id="function-save_bookmark_async"></a>

### save_bookmark_async

```rust
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.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/storage/i_storage_item.rs#L39)

<a id="function-get_parent_async"></a>

### get_parent_async

```rust
fn get_parent_async(self: &Self) -> LocalBoxFuture<Option<Rc<dyn IStorageFolder>>>
```

Gets the parent folder of the current storage item.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/storage/i_storage_item.rs#L42)

<a id="function-delete_async"></a>

### delete_async

```rust
fn delete_async(self: &Self) -> LocalBoxFuture<std::io::Result<()>>
```

Deletes the current storage item and its contents.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/storage/i_storage_item.rs#L45)

<a id="function-move_async"></a>

### move_async

```rust
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.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/storage/i_storage_item.rs#L52)

<a id="function-as_storage_file"></a>

### as_storage_file

```rust
fn as_storage_file(self: Rc<Self>) -> Option<Rc<dyn IStorageFile>>
```

The item as a file, if it is one (C# `item as IStorageFile`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/storage/i_storage_item.rs#L58)

<a id="function-as_storage_folder"></a>

### as_storage_folder

```rust
fn as_storage_folder(self: Rc<Self>) -> Option<Rc<dyn IStorageFolder>>
```

The item as a folder, if it is one (C# `item as IStorageFolder`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/storage/i_storage_item.rs#L63)

<a id="function-as_storage_item_with_file_system_info"></a>

### as_storage_item_with_file_system_info

```rust
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.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/storage/i_storage_item.rs#L69)

<a id="function-as_any"></a>

### as_any

```rust
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.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/storage/i_storage_item.rs#L76)

## Trait implementations

- [`IStorageItem`](/docs/0.5.0/api/ferroui-base/platform/storage/trait-istorageitem/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
