.net - Saving files in Windows Store apps -


my program handles files specified user. after preferable retain modified file directory of source file. storagefolder.getfolderfrompathasync method returns "access denied".
file type associations in manifest can not added because after processing files retain extension. , kind of file (with extension), user chooses impossible. code in error occurs.

    internal async static void setfile(list<byte> bytearray , storagefile file)     {         try         {             string path = path.getdirectoryname(file.path);             storagefolder newfolder = await storagefolder.getfolderfrompathasync(path);             storagefile newfile = await newfolder.createfileasync(string.format(@"crt{0}", path.getfilename(file.name)), creationcollisionoption.failifexists);             stream stream = await file.openstreamforwriteasync();             binarywriter writer = new binarywriter(stream);             writer.write(bytearray);             writer.flush();         }         catch (exception ex)         {             throw ex;         }     } 

storagefile file - file user specified. i'm trying create new folder based on path of source file. error - "access denied". access folder, must register file extensions use. impossible. tell me, please, can around that? or can done in case?

as far know, cannot save file in pc unless proceed saving picker, in case of windows store app. why might access denied error. click here file access , permissions.

on other hand, can save files always, in system location dedicated app itself, in applicationdata.localfolder .

you can set additional capabilites app acces removable devices.

i don't know others these.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -