class Comet::SearchResultFileInfo

def to_hash

Returns:
  • (Hash) - The complete object as a Ruby hash
def to_hash
  ret = {}
  ret['path'] = @path
  ret['name'] = @name
  ret['type'] = @type
  unless @mode.nil?
    ret['mode'] = @mode
  end
  unless @mod_time.nil?
    ret['mtime'] = @mod_time
  end
  unless @access_time.nil?
    ret['atime'] = @access_time
  end
  unless @change_time.nil?
    ret['ctime'] = @change_time
  end
  unless @size.nil?
    ret['size'] = @size
  end
  @unknown_json_fields.each do |k, v|
    ret[k] = v
  end
  ret
end