public function delete()
    {
        $this->guardDeletedFile();

        $response = $this->api->request('DELETE', $this->absolutePath());

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

        // Set deleted flag to true, so any other calls to
        // this File will result in throwing exception.

        $this->deleted = true;

        return true;
    }