AddAllFromDirectoryContentOnly extension method for IWritableArchive#450
AddAllFromDirectoryContentOnly extension method for IWritableArchive#450iron9light wants to merge 3 commits into
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.