Reputation: 1
I am programming on Universal Windows Platform and want to create a folder in the given path URL but without using ApplicationData.Current.LocalFolder
because it returns the path C:
but the given path varies. Please advise.
Upvotes: 0
Views: 235
Reputation: 3286
We can not create a folder and a file from an arbitrary location on disk in a UWP App.
Apps can access certain file system locations by default. Apps can also access additional locations through the file picker, or by declaring capabilities.
For more info, please refer the File access permissions.
If you want to create a folder and a file to the Music, Pictures, and Videos libraries, we can declare capabilities in the app manifest (see App capability declarations). For more info, please refer Files and folders in the Music, Pictures, and Videos libraries.
We can also use the User’s Downloads folder. By default, your app can only access files and folders in the user's Downloads folder that your app created.
For the other Folders and files, we can call a file picker to let the user pick files and folders for the app to access (see Open files and folders with a picker).
Upvotes: 1