Ben
Ben

Reputation: 1216

Zip files which are located in IsolatedStorage

My application need to download multiple files in Silverlight, and because I don't want to ask user multiple times for permission to save the files, I save the files in IsolatedStorage first and then I want to zip them all to a file and ask once for saving permission.

therefore I used SharpZipLib to zip multiple files which are located in IsolatedStorage, the problem is that SharpZipLib just accept file address as ZipEntery:

ZipEntry z= new ZipEntry(name);

and as you know cause the files are located in IsolatedStorage I don't have the address of them.

I saw sample on Create a Zip from/to a memory stream or byte array but I cant use it for multiple files.

Please help me to find a way to use SharpZipLib or introduce me another way to downloading multiple files without asking multiple times for permission.

Upvotes: 0

Views: 421

Answers (1)

Henk Holterman
Henk Holterman

Reputation: 273219

The name in ZipEntry z= new ZipEntry(name); is a logical/relative name inside your zip, you can establish it any way you want.

So as long as you can re-open you IsoStorage files as a Stream, you should be able to use SharpZip.

Upvotes: 1

Related Questions