圖示
成員名稱
解釋add(filename,name)
新增檔案到壓縮包內
add(
directoryname)
新增資料夾到壓縮包內
comment()
獲取或設定壓縮包的註釋
del(name)
從壓縮包內刪除檔案或資料夾
dispose()
釋放資源
extract(name,
directory)
解壓檔案或資料夾到指定資料夾
extractall(
directory)
解壓全部檔案到指定資料夾
filebyte(name)
獲取壓縮包內檔案的
byte
值filebyte(name,level)
將byte
值作為檔案新增到壓縮包
isfile(name)
判斷壓縮包的指定名稱是否是檔案
md5()
獲取壓縮包的
md5碼
md5(name)
獲取壓縮包內檔案的
md5碼
new(filename)
載入或新建壓縮包
new(zipfile)
從現有的
zipfile
例項化zipfile()
獲取zipfile
類sub
add(byval filename as
string, byval name as
string)
filename
:檔案地址
name
:壓縮包內使用的檔名(可以包括路徑)
.add( “c:/1.bmp”, “bmp/1.bmp”)
subadd(byval directoryname as
string)
directoryname
:資料夾地址
.add( “c:/123/”)
property
comment() as
string
text = .comment()
subdel(byval name as
string)
name
:檔名
.del( “1.bmp”)
.del( “123”)
.del( “bmp/1.bmp”)
subdispose() implements system.idisposable.dispose
.dispose()
subextract(byval name as
string, byval directory as
string)
name
:檔名(可以是包含資料夾的地址)
directory
:解壓到的目錄
.extract( “1.bmp”, “c:/123/”)
.extract( “bmp/1.bmp”, “c:/123”)
.extract( “123”, “c:/123/”)
subextractall(byval directory as
string)
directory
:解壓到的資料夾
.extractall( “c:/123”)
default
readonly
property filebyte(byval name as
string) as
byte()
name
:檔名(可包含目錄號“/”)
bytes = .filebyte( “1.bmp”)
bytes = filebyte( “bmp/1.bmp”)
default
writeonly
property filebyte(byval name as
string, byval level as icsharpcode.sharpziplib.zip.compressionmethod) as
byte()
name
:檔名(可包含目錄號“/”)
level
:壓縮等級(0~99)
.filebyte( “1.bmp”, 0) = bytes
.filebyte( “bmp/1.bmp”, 99) = bytes
readonly
property isfile(byval name as
string) as
boolean
name
:檔名
b = .isfile( “1.bmp”)true
b = .isfile( “bmp/1.bmp”)true
b = .isfile( “123”)false
readonly
property md5() as
string
str = .md5()
readonly
property md5(byval name as
string) as
string
name
:檔名
str = .md5( “1.bmp”)
str = .md5( “bmp/1.bmp”)
subnew(byval filename as
string)
filename
:zip
檔案地址(沒有的會自動建立)
private zip as new quickzip( “c:/11.zip”)
subnew(byval zipfile as zipfile)
zipfile
:zipfile
private zipfile as new
sharpziplib.zip.zipfile
private zip as new quickzip( zipfile)
readonly
property zipfile() as zipfile
private zipfile as
sharpziplib.zip.zipfile
zipfile = .zipfile()
例子,從c:/1.zip內讀取1.bmp到_bitmap