public function deleteDir($name)
    {
        $response = $this->api->request('DELETE', $this->absolutePath($name));

        if ($response->getStatusCode() !== 204) {
            throw new ApiRequestFailedException('Unable to delete directory "'.$name.'".', $response->getStatusCode());
        }

        return true;
    }