Class: Vfs::Entry
- Inherits:
-
Object
- Object
- Vfs::Entry
- Defined in:
- lib/vos/helpers/ubuntu.rb
Instance Method Summary collapse
Instance Method Details
#symlink_to(entry, options = {}) ⇒ Object
38 39 40 41 42 43 |
# File 'lib/vos/helpers/ubuntu.rb', line 38 def symlink_to entry, = {} raise "invalid argument!" unless entry.is_a? Entry raise "can't use symlink ('#{self}' and '#{entry}' are on different storages)!" if self.storage != entry.storage raise "symlink target '' not exist!" unless entry.exist? storage.bash "ln -s#{'f' if [:override]} #{entry.path} #{path}" end |
#symlink_to!(entry) ⇒ Object
45 46 47 |
# File 'lib/vos/helpers/ubuntu.rb', line 45 def symlink_to! entry symlink_to entry, override: true end |