shagufta syed
shagufta syed

Reputation: 471

Directory.GetFiles not working in UWP app

I need a recursive list of all files and folders at a path. However, in UWP only these (Windows 10 Universal App File/Directory Access) files and folders can be accessed and I dont want the user to pick a file. So I tried using Directory.GetFiles method and this is not returning any file names without giving any error. Does this method work at all in UWP?

Upvotes: 1

Views: 1364

Answers (1)

shagufta syed
shagufta syed

Reputation: 471

We cannot access any local storage without user interaction. However, we can access known folders by adding capabilities in app manifest and adding declaration for file type associations.

Upvotes: 1

Related Questions