Quantcast
Channel: Our ComponentOne » All Posts
Viewing all articles
Browse latest Browse all 14170

Problems while adding folder to zip file

$
0
0

Hello,

I want to include all the files in a folder in my IsolatedStorage (like '/shared/shellcontent/’) to a single zip file on Windows Phone.

var zip = new C1ZipFile(fileName, true);
using (var isoStore = IsolatedStorageFile.GetUserStoreForApplication())
{
var lst = isoStore.GetFileNames(Path.Combine(folderPath, "*.*")).Select(file => Path.Combine(folderPath, file)).ToList();

foreach (var item in lst)
{
zip.Entries.Add(item);
}
}

In lst i have a list of all paths of the files, like '/shared/shellcontent/myfile.png’, but if I want to add this item to the zip file I will get an error that the file couldn’t be found: File not found: 'shared\shellcontent\myfile.png’.

But because it is in lst the file exists? So how can I add all files of an folder to a single zip file on Windows Phone? Thanks.


Viewing all articles
Browse latest Browse all 14170

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>