Folder picker and Path RRS feed

  • Question

  • Hello

    I got a folder from my folderpicker, and saved to de FutureAccessList

    Dim Elegir As FolderPicker = New FolderPicker()
    Dim CarpetaElegida As StorageFolder = Await Elegir.PickSingleFolderAsync()
    StorageApplicationPermissions.FutureAccessList.AddOrReplace("Carpeton", CarpetaElegida)

    But when I try to used later on like this:

    Dim CarpetaOrigen As StorageFolder = Await StorageApplicationPermissions.FutureAccessList.GetFolderAsync("Carpeton")
    Dim doc As XElement = XElement.Load(CarpetaOrigen.Path & "\Configuracion.xml")

    I get an error : "Access to the path 'C:\Users\Diego\Documents\Configuracion.xml' is denied."

    In that folder there are like a hundred .XML files that I need to Read & Write.

    Thursday, May 8, 2014 9:18 AM


  • Your app doesn't have direct access to the files there so it cannot access them directly by path. You'll need to open them via the StorageFile and then use the data from the StorageFile's stream.

    I discussed this previously in my blog entry Skip the path: stick to the StorageFile   

    Thursday, May 8, 2014 2:03 PM