开发者

SharpZipLib ZipEntry how can you change the name of a file in the zip?

开发者 https://www.devze.com 2023-01-03 00:37 出处:网络
How do you change the name stored in the zip file?开发者_StackOverflow中文版 Also, can this be done when adding the file via:

How do you change the name stored in the zip file?

开发者_StackOverflow中文版

Also, can this be done when adding the file via:

ZipFile zf = new ZipFile("path");
zf.BeginUpdate();
zf.Add(filePath);  <-- i would like to also be able to change it when adding
zf.CommitUpdate();


Have you looked at the NameTransform property?

See SharpLibZip: Add file without path for an example of usage.

Update: Apparently, the latest version of SharpZipLib contains an overload for Add() that takes the filename.

0

精彩评论

暂无评论...
验证码 换一张
取 消