delete_resources_by_prefix() public method

public delete_resources_by_prefix ( $prefix, $options = [] )
Example #1
0
 function test09a_delete_resources_by_prefix()
 {
     // should allow deleting resources
     Curl::mockApi($this);
     $this->api->delete_resources_by_prefix("fooba");
     assertUrl($this, "/resources/image/upload");
     assertDelete($this);
     assertParam($this, "prefix", "fooba");
 }
 /**
  * @expectedException \Cloudinary\Api\NotFound
  */
 function test09a_delete_resources_by_prefix()
 {
     // should allow deleting resources
     \Cloudinary\Uploader::upload("tests/logo.png", array("public_id" => "api_test_by_prefix"));
     $resource = $this->api->resource("api_test_by_prefix");
     $this->assertNotEquals($resource, NULL);
     $this->api->delete_resources_by_prefix("api_test_by");
     $this->api->resource("api_test_by_prefix");
 }
 /**
  * Delete a directory.
  * Delete Files using directory as a prefix.
  *
  * @param string $dirname
  *
  * @return bool
  */
 public function deleteDir($dirname)
 {
     $response = $this->api->delete_resources_by_prefix($dirname);
     return true;
 }