def delete_directory(dir_path, opts = {})
      url     = obj_url(dir_path)
      headers = gen_headers(opts)

      attempt(opts[:attempts]) do
        result = @client.delete(url, nil, headers)
        raise unless result.is_a? HTTP::Message

        return true, result.headers if result.status == 204
        raise_error(result)
      end
    end
def delete_directory(dir_path, opts = {})
      url     = obj_url(dir_path)
      headers = gen_headers(opts)

      attempt(opts[:attempts]) do
        result = @client.delete(url, nil, headers)
        raise unless result.is_a? HTTP::Message

        return true, result.headers if result.status == 204
        raise_error(result)
      end
    end
Removes a directory from Manta at a given path.

 The path must start with /<user>/stor or /<user/public and point at an
 actual object.

 Returns true along with received HTTP headers.

 If there was an unrecoverable error, throws an exception. On connection or
 corruption errors, more attempts will be made; the number of attempts can
 be altered by passing in :attempts.