Class: File
Class Method Summary collapse
-
.safe_link(src, dest) ⇒ Object
platform safe file.link which attempts a copy if hard-linking fails.
Class Method Details
.safe_link(src, dest) ⇒ Object
platform safe file.link which attempts a copy if hard-linking fails
43 44 45 46 47 48 49 |
# File 'lib/sup/util.rb', line 43 def self.safe_link src, dest begin File.link src, dest rescue FileUtils.copy src, dest end end |