-
Notifications
You must be signed in to change notification settings - Fork 313
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
Added option to exclude files #177
Conversation
|
||
public interface ExcludeFileHandler { | ||
|
||
boolean isExcluded(File file); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about more than one excluded file or directory?
- root
-- firstFolder
-- secondFolder
-- thirdFolder
-- firstFile
-- secondFile
For example, I want to exclude firstFolder, secondFolder and firstFile.
I think I am not able to do it with current solution, right?
Yes that would be possible. Use ZipParameters#setExcludeFileHandler() and pass an instance of the ExcludeFileHandler. Now create a list of all files which you want to exclude and check if the file matches the file in the method parameter. I am on phone right now, I can post the code here tomorrow. |
Oh, got it, thank you! |
I hope everything works. Let me know if there is something wrong :) |
Sorry, I have been a bit busy lately. I will have a look at this tomorrow. |
@srikanth-lingala hi, could you please check it? |
Any update? |
Sorry for the delay, but I am going through some of the busiest days now. I will have a look at it in a day or two. |
PR looks fine. I will merge it. I will add some test before making a release. I have created an issue for it #189 |
#176