Method: Mtree::FileSpecification#symlink_to!
- Defined in:
- lib/mtree/file_specification.rb
#symlink_to!(destination) ⇒ Object
115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/mtree/file_specification.rb', line 115 def symlink_to!(destination) unless nochange @attributes = { type: 'link', link: File.join(destination, relative_path).sub(%r{/\.$}, '').sub(%r{/\./}, '/'), } end children.each do |child| child.symlink_to!(destination) end self end |