Skip to main content

IStorageItem Interface

Not client implementable.

Note: This interface is not client implementable. You need to enable PrivateApi if you want to implement this interface.

Manipulates storage items (files and folders) and their contents, and provides information about them

Definition​

Namespace: Avalonia.Platform.Storage
Assembly: Avalonia.Base (in Avalonia.Base.dll)

[NotClientImplementableAttribute]
public interface IStorageItem : IDisposable
View Source
ImplementsIDisposable

Remarks​

This interface inherits IDisposable . It's recommended to dispose IStorageItem when it's not used anymore.

Properties​

CanBookmarkReturns true is item can be bookmarked and reused later.
NameGets the name of the item including the file name extension if there is one.
PathGets the file-system path of the item.

Methods​

DeleteAsync()Deletes the current storage item and it's contents
Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from IDisposable)
GetBasicPropertiesAsync()Gets the basic properties of the current item.
GetParentAsync()Gets the parent folder of the current storage item.
MoveAsync(IStorageFolder)Moves the current storage item and it's contents to a IStorageFolder
SaveBookmarkAsync()Saves items to a bookmark.

Extension Methods​

TryGetLocalPath()Gets the local file system path of the item as a string.
(Defined by StorageProviderExtensions)

See Also​

Reference​

Avalonia.Platform.Storage Namespace