Share data among multiple users of a WinRT app

2019-09-01 03:07发布

问题:

We developped a Windows Store app (Windows 8) that gets files from the internet and stores them locally to make them available offline. You can think of it as a one-way synchronization that the app does on a regular basis. The problem is the amount of files is huge (around 500Mb) and the application can be used by different users on the same device.

As the app writes the synchronized files in its LocalFolder (ApplicationData.Current.LocalFolder), and as this location is not shared amoung users, each user duplicates the same 500Mb files when synchronizing.

Is there a way to store those files on the device so that the app can use them whoever synchronized them?

Note that we don’t need those files to be browsable outside of the app.

回答1:

Here is the list of locations, that you can access from Windows Store App: File access and permissions in Windows Store apps. There is no folders like shared location. You can try to force the user to save files to the shared location with FileSavePicker, however you'll lose this file for your app (your app won't see this file if the user will save it in the personal folder).