-
Notifications
You must be signed in to change notification settings - Fork 480
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
AddAllFromDirectoryContentOnly extension method for IWritableArchive #450
base: master
Are you sure you want to change the base?
Conversation
…gnore timestamp). This method is used to make sure same contents of a directory will always output the same binary.
So you basically just want an overload to ignore timestamps? Can they just be an option instead of a new method? |
Indeed, it will do two things.
if I only add a default parameter B.T.W. I fixed a bug. Correct me if I'm wrong. |
I still think adding one or more parameters to the options class is the correct thing to do. I like your use case so I have no issues with the functionality. Yeah I saw the bug fix. Just shows no one uses NET35 |
Sorry, I misunderstood what's you mean. I just found it right after I updated this PR. I thought you want me to add one more parameter for those extension methods. |
If add a public interface IContentOnlyWritableArchive: IArchive
{
void RemoveEntry(IArchiveEntry entry);
IArchiveEntry AddEntry(string key, Stream source, bool closeStream, long size = 0);
void SaveTo(Stream stream, WriterOptions options);
}
public interface IWritableArchive: IContentOnlyWritableArchive
{
IArchiveEntry AddEntry(string key, Stream source, bool closeStream, long size, DateTime modified);
} It looks like a breaking change. If we ignore the interface change. When and where the paths will be sorted? So I think extension methods is best choice for now. |
Only write content (will ignore timestamp). This method is used to make sure same contents of a directory will always output the same binary.