【发布时间】:2018-01-19 04:55:50
【问题描述】:
正如标题所说,我需要从 zip 文件中读取文件名。我将把名字输入一个二维字符串数组(连同其他数据)。这是我想做的一个开始的例子。
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)
{
//otherArr[count,count] = e; -adds the file, but I need title
}
return MyArr;
}
我确定我遗漏了一些简单的东西,但我似乎无法在 ZipFile 类中找到“文件名”属性。导入的包名为 Ionic.Zip。
也许它是某种压缩对象的属性?
【问题讨论】:
-
是的,那肯定是错误的文档。
-
@hvd 哎呀。我会更新的。