Sha256: e265b29ffe918a741f71750d35045ea162ed74581fdcda8ce0b96ed9192a59e1
Contents?: true
Size: 425 Bytes
Versions: 10
Compression:
Stored size: 425 Bytes
Contents
require 'fileutils' module FileUtils module_function LINKING_SUPPORTED = [true] # Attempt to do a normal file link, but fall back # to a copy if the link fails. # # CREDIT: Jim Weirich def safe_ln(*args) unless LINKING_SUPPORTED[0] cp(*args) else begin ln(*args) rescue Errno::EOPNOTSUPP LINKING_SUPPORTED[0] = false cp(*args) end end end end
Version data entries
10 entries across 9 versions & 2 rubygems