def metadata(path, options={})
      path = path.sub(/^\//, '')
      args = [
              'metadata',
              root(options)
              ]
      args += Dropbox.check_path(path).split('/')
      args << Hash.new
      args.last[:file_limit] = options[:limit] if options[:limit]
      args.last[:hash] = options[:prior_response].hash if options[:prior_response] and options[:prior_response].hash
      args.last[:list] = !(options[:suppress_list].to_bool)
      args.last[:ssl] = @ssl

      begin
        parse_metadata(get(*args)).to_struct_recursively
      rescue UnsuccessfulResponseError => error
        raise TooManyEntriesError.new(path) if error.response.kind_of?(Net::HTTPNotAcceptable)
        raise FileNotFoundError.new(path) if error.response.kind_of?(Net::HTTPNotFound)
        return options[:prior_response] if error.response.kind_of?(Net::HTTPNotModified)
        raise error
      end
    end
def metadata(path, options={})
      path = path.sub(/^\//, '')
      args = [
              'metadata',
              root(options)
              ]
      args += Dropbox.check_path(path).split('/')
      args << Hash.new
      args.last[:file_limit] = options[:limit] if options[:limit]
      args.last[:hash] = options[:prior_response].hash if options[:prior_response] and options[:prior_response].hash
      args.last[:list] = !(options[:suppress_list].to_bool)
      args.last[:ssl] = @ssl

      begin
        parse_metadata(get(*args)).to_struct_recursively
      rescue UnsuccessfulResponseError => error
        raise TooManyEntriesError.new(path) if error.response.kind_of?(Net::HTTPNotAcceptable)
        raise FileNotFoundError.new(path) if error.response.kind_of?(Net::HTTPNotFound)
        return options[:prior_response] if error.response.kind_of?(Net::HTTPNotModified)
        raise error
      end
    end
Returns a +Struct+ containing metadata on a given file or folder. The path
 is assumed to be relative to the configured mode's root.

 If you pass a directory for +path+, the metadata will also contain a
 listing of the directory contents (unless the +suppress_list+ option is
 true).

 For information on the schema of the return struct, see the Dropbox API
 at https://www.dropbox.com/developers/docs#metadata

 The +modified+ key will be converted into a +Time+ instance. The +is_dir+
 key will also be available as <tt>directory?</tt>.

 Options:

 +suppress_list+:: Set this to true to remove the directory list from
                   the result (only applicable if +path+ is a directory).
 +limit+:: Set this value to limit the number of entries returned when
           listing a directory. If the result has more than this number of
           entries, a TooManyEntriesError will be raised.
 +prior_response+:: The response from a prior call to metadata for the same
                    path. If the metadata has not changed since the prior
                    call, the entire metadata will not be re-downloaded.
                    Operation is undefined if the given value was for a
                    call to metadata with a different path.
 +mode+:: Temporarily changes the API mode. See the MODES array.