1

I am using VS 2015 on windows 10.I want to retrieve the all logical drives present in system and then bind it to dropdown list in UWP application. I had referred link:

Getting a list of logical drives

C# dropbox of drives

But problem is that DriveInfo.GetDrives() not found in System.IO namespace in UWP context. Also Environment.GetLogicalDrives() giving an error that Environment does not contain definition GetLogicalDrives() in UWP application. It will be great help if can sort out the solution for this.

Community
  • 1
  • 1
Ankush Butole
  • 151
  • 13
  • Even if this were somehow possible, you wouldn't have unrestricted access to the filesystems on those drives. File access in UWP is quite restricted. – Decade Moon Dec 20 '16 at 10:33

1 Answers1

2

In UWP, you are not able to list all drives. You have only access to folder available through Windows.Storage.KnownFolders such as DocumentsLibrary, PicturesLibrary, RemovableDevices...

For this last one, check the documentation: Access the sd card.

If you want to access other location, you will have to request user permission and it will be only available thanks file pickers.

Arnaud Develay
  • 3,920
  • 2
  • 15
  • 27