Module: Pod::IOUtils
- Defined in:
- lib/cocoapods-spm/helpers/io.rb
Class Method Summary collapse
Class Method Details
.symlink(src, dst) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/cocoapods-spm/helpers/io.rb', line 3 def self.symlink(src, dst) # NOTE: File operations are case-insensitive (foo.json and Foo.json are identical) return if File.identical?(src, dst) src = Pathname.new(src) unless src.is_a?(Pathname) dst = Pathname.new(dst) unless dst.is_a?(Pathname) dst.delete if dst.exist? File.symlink(src.absolute? ? src : src.realpath, dst) end |