[英]Decompress ZIP file in isolated storage
打開zip存檔並枚舉所有條目。 打開為您提供流的每個條目,然后將該條目的內容復制到隔離的存儲流中:
using (ZipArchive archive = ZipFile.OpenRead(zipPath))
{
foreach (ZipArchiveEntry entry in archive.Entries)
{
using (Stream zipStream = entry.Open())
using (IsolatedStorageFileStream isoStream = new IsolatedStorageFileStream(entry.Name, FileMode.CreateNew, isoStore))
{
// copy from zipStream to isoStream
}
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.