FrontPage › FileCopy
# simple file copy # 2011. 1. 7 from = File.open("test.png", "rb:binary") data = from.read from.close to = File.open("test2.png", "wb:binary") to.write(data) to.close
* More ruby style code
File.open("test.png", "rb:binary") { |from| $data = from.read } File.open("test2.png", "wb:binary") { |to| to.write($data) }