Class: Vfs::UniversalEntry

Inherits:
Entry
  • Object
show all
Defined in:
lib/vfs/entries/universal_entry.rb

Instance Attribute Summary

Attributes inherited from Entry

#driver, #path, #path_cache

Instance Method Summary (collapse)

Methods inherited from Entry

#==, #created_at, #delete, #dir, #dir?, #entry, #eql?, #file, #file?, #get, #hash, #initialize, #inspect, #local?, #name, #parent, #set, #tmp, #updated_at

Constructor Details

This class inherits a constructor from Vfs::Entry

Instance Method Details

- (Object) copy_to(to, options = {})



11
12
13
14
# File 'lib/vfs/entries/universal_entry.rb', line 11

def copy_to to, options = {}
  from = file? ? to_file : to_dir
  from.copy_to to, options
end

- (Object) destroy

CRUD



20
21
22
# File 'lib/vfs/entries/universal_entry.rb', line 20

def destroy
  destroy_entry
end

- (Boolean) exist?

Attributes

Returns:

  • (Boolean)


6
7
8
# File 'lib/vfs/entries/universal_entry.rb', line 6

def exist?
  !!get
end