How to use UWP's StorageFolder in a .NET Standard library (which expects DirectoryInfo)

Viewed 579

Related information:

In the context of a UWP application, even when the user has granted permission to use a given folder through the FolderPicker, subsequent access to the folder must still happen through the Windows.Storage API's.

What is the best practice for going from a StorageFolder in the 'UWP API scope' to a library written in a '.NET Standard API scope' which internally uses DirectoryInfo.

UPDATE

I've already included the 'broadFileSystemAccess' capability to the Package.appxmanifest:

... xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation>/windows10/restrictedcapabilities"
... IgnorableNamespaces="uap mp rescap"
... <rescap:Capability Name="broadFileSystemAccess" />
0 Answers
Related