public function delete($fid) {
        $volume = $this->lookup($fid);

        if (!$volume) {
            throw new SeaweedFSException('Unable to find volume for ' . $fid);
        }

        $res = $this->client->delete($this->buildVolumeUrl($volume->getUrl(), $fid));

        if ($res->getStatusCode() != 202) {
            throw new SeaweedFSException('Unexpected response when deleting file: ' . $res->getStatusCode());
        }

        if ($this->cache && $this->cache->has('file_meta_' . $fid)) {
            $this->cache->remove('file_meta_' . $fid);
        }

        return true;
    }
public function delete($fid) {
        $volume = $this->lookup($fid);

        if (!$volume) {
            throw new SeaweedFSException('Unable to find volume for ' . $fid);
        }

        $res = $this->client->delete($this->buildVolumeUrl($volume->getUrl(), $fid));

        if ($res->getStatusCode() != 202) {
            throw new SeaweedFSException('Unexpected response when deleting file: ' . $res->getStatusCode());
        }

        if ($this->cache && $this->cache->has('file_meta_' . $fid)) {
            $this->cache->remove('file_meta_' . $fid);
        }

        return true;
    }
public function delete ( $ fid ) { $ volume = $ this -> lookup ( $ fid ) ; if ( ! $ volume ) { throw new SeaweedFSException ( 'Unable to find volume for ' . $ fid ) ; } $ res = $ this -> client -> delete ( $ this -> buildVolumeUrl ( $ volume -> getUrl ( ) , $ fid ) ) ; if ( $ res -> getStatusCode ( ) != 202 ) { throw new SeaweedFSException ( 'Unexpected response when deleting file: ' . $ res -> getStatusCode ( ) ) ; } if ( $ this -> cache && $ this -> cache -> has ( 'file_meta_' . $ fid ) ) { $ this -> cache -> remove ( 'file_meta_' . $ fid ) ; } return true ; }
Delete the specified file.

@param $fid
@return bool
@throws SeaweedFSException
Delete the specified file .