question

Groovykool-9087 avatar image
0 Votes"
Groovykool-9087 asked ·

Is it true that UWP does not support User/Custom StorageLibraries?

Hello,

I have not found any way to access or get User/Custom StorageLibraries?

This method from the StorageLibrary Class only works for the Known Libraries?

public static IAsyncOperation GetLibraryAsync(KnownLibraryId libraryId)

Regards,
Tony

windows-uwp
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

jadailey-MSFT avatar image
1 Vote"
jadailey-MSFT answered ·

Unfortunately you can't access custom StorageLibraries through the UWP APIs. UWP requires that you request access to individual libraries through the manifest. At this time there is no way to request access to a custom library via the UWP manifest. Because of this you can't register the custom library and use the GetLibraryAsync to access it.

You can still access the library in your app via the file picker.

· 5 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

If you have a particular reason why you need this functionality please post it in the comments. I'm very curious what problem you are trying to solve by accessing custom libraries in your UWP app.

1 Vote 1 ·

Well windows has support for custom storage libraries. If a user has a custom library for say ebooks or recipes, consisting of several folders. It would be preferable to select the library from a picker instead of selecting many folders with the folderpicker. My opinion would be that anything File Explorer can pick should be available to pick in UWP.


Regards,
Tony

0 Votes 0 ·

Hi Tony,

Thanks for your response. The modern file open picker mimics the functionality of Windows Explorer and highlights the file libraries on the top of the file navigation tree under "This PC". This makes it quick and easy for users to access their libraries.

I understand that this isn't the same as direct access to the custom libraries. Because of the current library access model adding direct access would require knowledge of the library name at compile time. That doesn't really work with custom libraries.

Based on my understanding of the code, I think direct access to custom libraries is going to be out of scope for the foreseeable future. That said, I'll certainly forward your feedback to the UWP shell team. I'm sure that they will be interested in your thoughts.

Thanks again for the feedback and your willingness to help us make the UWP developer experience better!

-James

1 Vote 1 ·
Show more comments