locked
Could not find any file inside local Google Drive folder with StorageFolder

    Question

  • Hi!

    I'm trying to load some file from my local Google Drive folder.
    (This folder is a normal folder that Google drive desktop software sync with the cloud),
    I can see the files from the picker, but it does not return any file.
    It works correctly with any other folder. 

    Anyone have some idea why this is happening?

    Thank you very much.


    Gustavo

    Monday, May 05, 2014 2:18 PM

All replies

  • I can see the files from the picker, but it does not return any file.

    Is what you are saying that the filepicker actually shows the files in the Google drive folder on the screen, but when you choose one and click "open" (or whatever the picker's button is) the StorageFile returned is null?

    Darin R.

    Monday, May 05, 2014 3:01 PM
  • Yes Darin!

    I have a IReadOnlyList<StorageFile> and Count is 0.

    I have this code:

    IReadOnlyList<StorageFile> allFiles;
    FolderPicker folderPicker = new FolderPicker();
    folderPicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary;
    folderPicker.FileTypeFilter.Add("*");
    StorageFolder folder = await folderPicker.PickSingleFolderAsync();
    var query = folder.CreateFileQueryWithOptions(new QueryOptions(CommonFileQuery.OrderByName, new[] {"*"} ));
    allFiles = await query.GetFilesAsync();
    int allCount = allFiles.Count;

    This issue happen only with the local Google Drive Folder!
    Any idea?


    Gustavo

    Monday, May 05, 2014 3:33 PM