[出包中求助]sharpziplib空目錄解壓縮問題
本帖最後由 kevin001958 於 2019-5-23 23:08 編輯如提,如果我的test.zip檔案內有1,2這兩個資料夾還有test3.txt3個檔案
1內有test1.txt,2為空資料夾
然後我解壓縮要怎麼解壓縮出1內含有test1,2(空資料夾)跟test3檔案
1有test1 2為空目錄
解壓出來變成
要怎麼作才能變成目的資料夾內含有1跟2資料夾
test1.txt在資料夾1內
test3.txt在目的資料夾內
class1.vb:
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Threading.Tasks
Imports ICSharpCode.SharpZipLib.Zip
Imports ICSharpCode.SharpZipLib
Imports ICSharpCode.SharpZipLib.Core
Class Class1
Public Shared Sub ZipUnpack(ByVal zipFileName As String, ByVal targetDir As String)
Dim fastZip As FastZip = New FastZip()
Dim fileFilter As String = Nothing
fastZip.ExtractZip(zipFileName, targetDir, fileFilter)
End Sub
End Class
事件觸發調用:
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Class1.ZipUnpack("test.zip", "test")
End Sub
頁:
[1]