Created
August 31, 2018 13:48
-
-
Save bvjebin/07b16752235d2f155638df1579a028b8 to your computer and use it in GitHub Desktop.
Create zip in elixir for medium post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create_zip(path) do | |
old_path = File.cwd! | |
File.cd! path | |
:zip.create("images.zip", ['images'], [{:cwd, path}]) | |
File.cd! old_path | |
path<>"/images.zip" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment