-
Notifications
You must be signed in to change notification settings - Fork 976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FastZip does not allow Extended Path Filter to be specified #405
Comments
No, there does not seem to be any way to provide custom filters for Otherwise, your use case could be achieved fairly easily with using (var zf = new ZipFile(zipFileName)) {
zf.BeginUpdate();
var yesterday = DateTime.UtcNow.AddDays(-1);
var files = Directory.GetFiles(sourceDir)
.Where(f => new FileInfo(f).LastWriteTimeUtc > yesterday);
foreach(var file in files){
// Provide an entry name as a second parameter
// to avoid using the full path to the file
var entryName = Path.GetFileName(file);
zf.Add(file, entryName);
}
zf.CommitUpdate();
} |
Maybe an extra version of It looks like |
#482 allows alternate filters to be specified for CreateZip, though doesn't change the Extract functions. |
This should be fixed by #482. |
Version of SharpZipLib: 1.2.0
trying to use Extended Path Filter, but don't see any examples. FastZip uses strings for Name and Directory filters, but I need file time as a criteria. I don't see how to use the ExtendedPathFilter class when creating a zip file using FastZip or any other method. Can you help?
The text was updated successfully, but these errors were encountered: