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, #destroy, #dir, #dir?, #entry, #eql?, #file, #file?, #get, #hash, #initialize, #inspect, #local?, #name, #parent, #remove, #set, #tmp, #updated_at

Constructor Details

This class inherits a constructor from Vfs::Entry

Instance Method Details

#copy_to(to, options = {}) ⇒ Object



9
10
11
12
# File 'lib/vfs/entries/universal_entry.rb', line 9

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

#deleteObject

CRUD.



16
17
18
# File 'lib/vfs/entries/universal_entry.rb', line 16

def delete
  delete_entry
end

#exist?Boolean

Attributes.

Returns:

  • (Boolean)


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

def exist?
  !!get
end