windows runtime - Retrieving all files with GetItemsAsync without having to specify file types -


i'm trying list of files winrt device following code:

var folder = knownfolders.documentslibrary;

var items = await folder.getitemsasync();

this returns list of folders , files. problem file list contains files extensions have added package.appxmanifest

is there way retrieve files? * . * ?

i don't think there's direct way it. according this article can done pictures, music , videos library not documents library

you must add file type associations app manifest declare specific file types app can access in location.

if user select folder folderpicker, access items, though:

var picker = new folderpicker(); picker.filetypefilter.add(".txt"); var folder = await picker.picksinglefolderasync(); var items = await folder.getitemsasync(); 

it enough user once. can add folder futureaccesslist , store token returns:

var token = storageapplicationpermissions.futureaccesslist.add(folder); 

when user runs app next time can use token access folder again:

folder = await storageapplicationpermissions.futureaccesslist.getfolderasync(token); var items = await folder.getitemsasync(); 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -