StorageProvider
The StorageProvider
is central to file and folder management. It provides methods for file and folder selection, checking platform capabilities, and interacting with stored bookmarks.
The StorageProvider
can be access through an instance of TopLevel
or Window
, for more details on accessing TopLevel
please visit TopLevel page:
var storage = window.StorageProvider;
Properties
CanOpen
Indicates whether it's possible to open a open file picker
on the current platform.
bool CanOpen { get; }
CanSave
Indicates whether it's possible to open a save file picker
on the current platform.
bool CanSave { get; }
CanPickFolder
Indicates whether it's possible to open a folder picker
on the current platform.
bool CanPickFolder { get; }
Methods
OpenFilePickerAsync
Opens a file picker dialog.
Task<IReadOnlyList<IStorageFile>> OpenFilePickerAsync(FilePickerOpenOptions options);
The method returns an array of selected IStorageFile
instances or an empty collection if the user cancels the dialog.