public function remove_file()
    {
        if ($this->is_physically_present() && is_writable($this->getRealPath())) {
            unlink($this->getRealPath());

            $this->delete_data_from_cache();

            $permalink = $this->get_permalink();

            if ($permalink instanceof media_Permalink_Adapter) {
                $permalink->delete_data_from_cache();
            }

            $this->markPhysicallyUnavailable();
        }

        return $this;
    }