Sha256: cef7cbc83c5ab5740726befecf24f2f89b6606fc7985339953320c144e1198f3

Contents?: true

Size: 388 Bytes

Versions: 1

Compression:

Stored size: 388 Bytes

Contents

module Vfs
  class UniversalEntry < Entry
    #
    # Attributes
    #
    def exist?
      !!get
    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
    end
    alias_method :destroy!, :destroy
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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