Sha256: 272f80f656fa3accd2059f3ad4b75e0367ded1bcd2df2aeddd074639e1bb7205

Contents?: true

Size: 365 Bytes

Versions: 1

Compression:

Stored size: 365 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

1 entries across 1 versions & 1 rubygems

Version Path
vfs-0.3.13 lib/vfs/entries/universal_entry.rb