就像标题所说,我需要从zip文件中读取文件的名称。我将把这些名称提供给一个2D字符串数组(以及其他数据)。这是我想要做的一个开始的例子。从ZipFile中检索文件名
private String[,] ArrayFiller(ZipFile MyZip)
{
int count = 0;
ZipFile zipfile = ZipFile.Read();
int zipSize = MyZip.Count;
string[,] MyArr = new string[zipSize, zipSize];
foreach (ZipEntry e in zipfile.EntriesSorted)
{
//dbcrArr[count,count] = e; -adds the file, but I need title
}
return MyArr;
}
我敢肯定我错过了简单的东西,但我似乎无法在ZipFile类中找到“文件名”属性。导入的软件包称为Ionic.Zip。
也许它是某种压缩对象的属性?
是的,那绝对是错误的文档。 – hvd
@ hvd哎呀。我会更新它。 – coinbird