Deletes directory.

@param string $name Directory name.

@throws \ArgentCrusade\Selectel\CloudStorage\Exceptions\ApiRequestFailedException

@return bool
18430
public function deleteDir($name)
    {
        $response = $this->api->request('DELETE', $this->absolutePath($name));

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

        return true;
    }
223057
public function deleteLabel(string $name): bool
    {
        $this->getApi()->request($this->getApi()
                                      ->sprintf('/repos/:owner/:repo/labels/:name', $this->getIssues()->getOwner(),
                                          $this->getIssues()->getRepo(), $name));

        if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
            return true;
        }

        return false;
    }
676592
public function delete($name)
	{
		$templates = $this->getTemplates();
		$templates->delete($name, $this->plugin->name);
	}
452331
public function destroy($name)
    {
        if (!array_key_exists($name, $this->_storage)) {
            trigger_error(
                "Attempted to destroy non-existent variable $name",
                E_USER_ERROR
            );
            return;
        }
        unset($this->_storage[$name]);
    }
139181
public function delete($name)
    {
        if ($this->cookies[$name]) {
            unset($this->cookies[$name]);

            return true;
        }

        return false;
    }
1116147
public static function delCache($name)
    {
        if (is_callable(self::$cache_callable['del'])) {
            return call_user_func_array(self::$cache_callable['del'], func_get_args());
        }
        $file = self::_getCacheName($name);
        return file_exists($file) ? unlink($file) : true;
    }
127024
public static function changeFolder(String $name) : Bool
    {
        $name = Info::rpath($name);

        if( ! is_dir($name) )
        {
            throw new Exception\FolderNotFoundException(NULL, $name);
        }

        return chdir($name);
    }
647090
public function move($directory, $name = null)
    {
        $target = $this->getTargetFile($directory, $name);

        if (!@rename($this->getPathname(), $target)) {
            $error = error_get_last();
            throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s)', $this->getPathname(), $target, strip_tags($error['message'])));
        }

        @chmod($target, 0666 & ~umask());

        return $target;
    }
265292
public function deleteIndex($name)
    {
        $client = $this->getClient();

        $index = $client->getIndex($name);
        $index->close();
        $index->delete();
    }
1072105
public function removeChild(string $name): bool
    {
        foreach ($this->children as $key => $child) {
            if ($child->appliesTo($name)) {
                $child->removeParentPath();
                unset($this->children[$key]);
                $this->updateModifications();
                return true;
            }
        }

        return false;
    }
349893
public function Delete($Name) {
      $Parsed = $this->Parse($Name);

      // Throw an event so that plugins that have stored the file somewhere else can delete it.
      $this->EventArguments['Parsed'] =& $Parsed;
      $Handled = FALSE;
      $this->EventArguments['Handled'] =& $Handled;
      $this->FireAs('Gdn_Upload')->FireEvent('Delete');

      if (!$Handled) {
         $Path = PATH_UPLOADS.'/'.ltrim($Name, '/');
         @unlink($Path);
      }
   }
583996
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;
  }
1124380
public function actionDelete($name)
    {
        $item = $this->getItem($name);
        \Yii::$app->authManager->remove($item);
        return $this->redirect(['index']);
    }
261738
public function delete($name)
    {
        try {
            $id = $this->getQueueId($name);
        } catch (RuntimeException $e) {
            return false;
        }

        try {
            $this->db->delete('Queues', ['queue_id' => $id]);
        } catch (Exception $e) {
            throw new RuntimeException($e->getMessage(), $e->getCode(), $e);
        }

        return true;
    }
1123889
protected function rmdir($name = '')
    {
        $result = true;
        $name = preg_replace(array('!\.{1,2}/!', '!^/!', '!/$!'), '', $name);
        $name = $this->dirData.$name;
        if (is_dir($name))
        {
            $files = glob($name.'/{.*,*}', GLOB_BRACE);
            for ($i = 0; $i < count($files); $i++)
            {
                if (substr($files[$i], -2) == '/.' || substr($files[$i], -3) == '/..') continue;
                if (is_dir($files[$i])) $result = $this->rmdir(substr($files[$i], strlen($this->dirData)));
                elseif (is_file($files[$i])) $result = filedelete($files[$i]);
                if (!$result) break;
            }
            if ($result) $result = rmdir($name);
        }
        return $result;
    }
97567
public function removeFileParameter($name)
    {
        if (!$this->hasFileParameter($name)) {
            throw new \InvalidArgumentException(sprintf('The file request parameter "%s" does not exist.', $name));
        }

        unset($this->fileParameters[$name]);
    }
1183055
public function delete($name)
  {
    $path = $this->_getPath($name);
    
    if (file_exists($path)) {
      $result = @unlink($path);
    } else {
      $result = false;
    }
    
    return $result;
  }