Class: Knj::Filesystem
Class Method Summary collapse
Class Method Details
.copy(args) ⇒ Object
2 3 4 5 6 7 |
# File 'lib/knj/filesystem.rb', line 2 def self.copy(args) FileUtils.rm(args[:to]) if args[:replace] and File.exists?(args[:to]) FileUtils.cp(args[:from], args[:to]) mod = File.lstat(args[:from]).mode & 0777 File.chmod(mod, args[:to]) end |