Class: FileUtils::Entry_
- Inherits:
-
Object
- Object
- FileUtils::Entry_
- Defined in:
- lib/freedom_patches/copy_file.rb
Instance Method Summary collapse
Instance Method Details
#copy_file(dest) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/freedom_patches/copy_file.rb', line 9 def copy_file(dest) File.open(path()) do |s| File.open(dest, "wb", s.stat.mode) do |f| IO.copy_stream(s, f) f.chmod(f.lstat.mode) end end end |