{"categories":["Ruby"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Funageanu.hatenablog.com%2Fentry%2F20090912%2F1252747303\" title=\" zip\u3092\u5c55\u958b\u3059\u308b\u30b5\u30f3\u30d7\u30eb - \u3046\u306a\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","version":"1.0","type":"rich","blog_url":"https://unageanu.hatenablog.com/","provider_name":"Hatena Blog","image_url":null,"published":"2009-09-12 18:21:43","description":"rubyzip\u3092\u4f7f\u3063\u3066zip\u30a2\u30fc\u30ab\u30a4\u30d6\u3092\u5c55\u958b\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u3067\u3059\u3002 require 'rubygems' require 'zip/zip' #===zip\u30d5\u30a1\u30a4\u30eb\u3092\u5c55\u958b\u3059\u308b\u3002 #zip:: zip\u30d5\u30a1\u30a4\u30eb #dest:: \u5c55\u958b\u5148\u30c7\u30a3\u30ec\u30af\u30c8\u30ea def extract( zip, dest ) FileUtils.makedirs(dest) Zip::ZipFile.foreach(zip) {|entry| if entry.file? FileUtils.makedirs(\"#{dest}/#{File.dirname(entry.name)}\") entry.get_input_stream\u2026","provider_url":"https://hatena.blog","height":"190","title":" zip\u3092\u5c55\u958b\u3059\u308b\u30b5\u30f3\u30d7\u30eb","width":"100%","url":"https://unageanu.hatenablog.com/entry/20090912/1252747303","author_url":"https://blog.hatena.ne.jp/unageanu/","blog_title":"\u3046\u306a\u306e\u65e5\u8a18","author_name":"unageanu"}