Sha256: 1e89c21619ff468eac6253e13c6de55ba9203064fb1dfb75e5c2e5a0517cc923

Contents?: true

Size: 376 Bytes

Versions: 17

Compression:

Stored size: 376 Bytes

Contents

module Vfs
  class UniversalEntry < Entry
    # 
    # Attributes
    # 
    def exist?
      attrs = get
      !!(attrs[:dir] or attrs[:file])
    end
    
    
    #
    # CRUD
    #
    def destroy
      storage.open_fs do |fs|
        attrs = get 
        fs.delete_dir path if attrs[:dir]
        fs.delete_file path if attrs[:file]
      end
      self
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
vfs-0.3.12 lib/vfs/entries/universal_entry.rb
vfs-0.3.11 lib/vfs/entries/universal_entry.rb
vfs-0.3.10 lib/vfs/entries/universal_entry.rb
vfs-0.3.9 lib/vfs/entries/universal_entry.rb
vfs-0.3.8 lib/vfs/entries/universal_entry.rb
vfs-0.3.7 lib/vfs/entries/universal_entry.rb
vfs-0.3.6 lib/vfs/entries/universal_entry.rb
vfs-0.3.5 lib/vfs/entries/universal_entry.rb
vfs-0.3.4 lib/vfs/entries/universal_entry.rb
vfs-0.3.3 lib/vfs/entries/universal_entry.rb
vfs-0.3.2 lib/vfs/entries/universal_entry.rb
vfs-0.3.1 lib/vfs/entries/universal_entry.rb
vfs-0.3 lib/vfs/entries/universal_entry.rb
vfs-0.2.1 lib/vfs/entries/universal_entry.rb
vfs-0.2 lib/vfs/entries/universal_entry.rb
vfs-0.1.1 lib/vfs/entries/universal_entry.rb
vfs-0.1.0 lib/vfs/entries/universal_entry.rb