def exists?(type, hash)
      if directory(type, hash) &&
         directory(type, hash).files.head(key_component(type, hash))
        true
      else
        false
      end
    end
def exists?(type, hash)
      if directory(type, hash) &&
         directory(type, hash).files.head(key_component(type, hash))
        true
      else
        false
      end
    end
Returns true if a object with the given hash exists.

    layer.exists?("documents", hash)