public function delete($name) {
    $url = self::objectUrl($this->url, $name);
    $headers = array(
      'X-Auth-Token' => $this->token,
    );

    $client = \HPCloud\Transport::instance();

    try {
      $response = $client->doRequest($url, 'DELETE', $headers);
    }
    catch (\HPCloud\Transport\FileNotFoundException $fnfe) {
      return FALSE;
    }

    if ($response->status() != 204) {
      throw new \HPCloud\Exception("An unknown exception occured while deleting $name.");
    }

    return TRUE;
  }
public function delete($name) {
    $url = self::objectUrl($this->url, $name);
    $headers = array(
      'X-Auth-Token' => $this->token,
    );

    $client = \HPCloud\Transport::instance();

    try {
      $response = $client->doRequest($url, 'DELETE', $headers);
    }
    catch (\HPCloud\Transport\FileNotFoundException $fnfe) {
      return FALSE;
    }

    if ($response->status() != 204) {
      throw new \HPCloud\Exception("An unknown exception occured while deleting $name.");
    }

    return TRUE;
  }
public function delete ( $ name ) { $ url = self :: objectUrl ( $ this -> url , $ name ) ; $ headers = array ( 'X-Auth-Token' => $ this -> token , ) ; $ client = \ HPCloud \ Transport :: instance ( ) ; try { $ response = $ client -> doRequest ( $ url , 'DELETE' , $ headers ) ; } catch ( \ HPCloud \ Transport \ FileNotFoundException $ fnfe ) { return FALSE ; } if ( $ response -> status ( ) != 204 ) { throw new \ HPCloud \ Exception ( "An unknown exception occured while deleting $name." ) ; } return TRUE ; }
Remove the named object from storage.

@param string $name
The name of the object to remove.
@retval boolean
@return boolean
TRUE if the file was deleted, FALSE if no such file is found.
Remove the named object from storage .