lib/vfs/entries/universal_entry.rb in vfs-0.3.15 vs lib/vfs/entries/universal_entry.rb in vfs-0.4.0

- old
+ new

@@ -6,19 +6,19 @@ def exist? !!get end + def copy_to to, options = {} + from = file? ? to_file : to_dir + from.copy_to to, options + end + + # # CRUD # - def destroy options = {} - storage.open do |fs| - attrs = get - fs.delete_dir path if attrs and attrs[:dir] - fs.delete_file path if attrs and attrs[:file] - end - self + def destroy + destroy_entry end - alias_method :destroy!, :destroy end end \ No newline at end of file