Skip to main content

IStorageProvider Interface

Not client implementable.

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

Definition

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

[NotClientImplementableAttribute]
public interface IStorageProvider
View Source

Properties

CanOpenReturns true if it's possible to open file picker on the current platform.
CanPickFolderReturns true if it's possible to open folder picker on the current platform.
CanSaveReturns true if it's possible to open save file picker on the current platform.

Methods

OpenFileBookmarkAsync(String)Open IStorageBookmarkFile from the bookmark ID.
OpenFilePickerAsync(FilePickerOpenOptions)Opens file picker dialog.
OpenFolderBookmarkAsync(String)Open IStorageBookmarkFolder from the bookmark ID.
OpenFolderPickerAsync(FolderPickerOpenOptions)Opens folder picker dialog.
SaveFilePickerAsync(FilePickerSaveOptions)Opens save file picker dialog.
TryGetFileFromPathAsync(Uri)Attempts to read file from the file-system by its path.
TryGetFolderFromPathAsync(Uri)Attempts to read folder from the file-system by its path.
TryGetWellKnownFolderAsync(WellKnownFolder)Attempts to read folder from the file-system by its path

Extension Methods

TryGetFileFromPathAsync(String)Attempts to read file from the file-system by its path.
(Defined by StorageProviderExtensions)
TryGetFolderFromPathAsync(String)Attempts to read folder from the file-system by its path.
(Defined by StorageProviderExtensions)

See Also

Reference

Avalonia.Platform.Storage Namespace