I am working with Store apps using C#.
I am using StorageApplicationPermissions.MostRecentlyUsedList
to load Local Epub files.
After getting those file as a Storage file.
string EpubPathToken= Windows.Storage.AccessCache.StorageApplicationPermissions.MostRecentlyUsedList.Add(file);
StorageFile file = await StorageApplicationPermissions.FutureAccessList.GetFileAsync(EpubPathToken);
Extraction(file);
While Extracting the Epub file as Zip to Package folder using ApplicationData
I am getting an Exeption of Unauthorized.
Why because If I use the same code using from KnownFolders like Pictures Library the Extraction is working Fine.
Can any one give me any idea about this ?
Finally I solved the issue of getting exception of Unauthorized With the use of Blog
I changed the code snippet according to my requirement.
The source of code describes writes bytes of file in
ZipArchiveEntry
, hence I used a helper methodGetByteFromFile()
, which takesStorageFile
object and returns mebyte[]
array.
Finally thanks to Xyroid