Skip to content

Commit

Permalink
add merge!(z::Archive, dict)
Browse files Browse the repository at this point in the history
  • Loading branch information
samoconnor committed Feb 9, 2016
1 parent 5a933d9 commit 6911527
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/info_zip.jl
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ function Base.setindex!(z::Archive, data, filename::AbstractString)
end


# Add contents of "dict" to archive.

function Base.merge!{T<:Associative}(z::Archive, dict::T)
for (filename, data) in dict
z[filename] = data
end
end



# Read files from ZIP using iterator syntax.

Expand Down

0 comments on commit 6911527

Please sign in to comment.