Delete entity.

@param string $path REST path
515190
private function _deleteEntity($path)
    {
        $method = Resources::HTTP_DELETE;
        $headers = [];
        $postParams = [];
        $queryParams = [];
        $statusCode = Resources::STATUS_NO_CONTENT;

        $this->sendHttp(
            $method,
            $headers,
            $queryParams,
            $postParams,
            $path,
            $statusCode
        );
    }
813242
public static function delete(string $path)
    {
        if (trim($path) === '') {
            throw new \InvalidArgumentException('$path is not a string or is whitespace');
        }

        if (!file_exists($path)) {
            return;
        }

        try {
            self::throwIfFalse(unlink($path), "unlink returned false for '{$path}'");
        } catch (\Exception $e) {
            if (file_exists($path)) {
                throw $e;
            }
        }
    }
1303796
public function delete($path)
    {
        $result = $this->client->deleteObject([
            'Bucket' => $this->getBucket(),
            'Key'    => $path,
        ]);

        return (bool) $result;
    }
1297650
public function removeAllInPath($path)
    {
        $path = strtolower($path);
        $query = $this->entityManager->createQuery('DELETE FROM Neos\ContentRepository\Domain\Model\NodeData n WHERE n.path LIKE :path');
        $query->setParameter('path', $path . '/%');
        $query->execute();
    }
729560
protected static function tryDelete($path)
    {
        $success = true;

        try
        {
            if ( ! @unlink($path))
            {
                $success = false;
            }
        } catch (ErrorException $e)
        {
            $success = false;
        }

        return $success;
    }
706563
public function removeNodes($path)
    {
        $nodesToRemove = $this->getNodes($path);
        if ($nodesToRemove) {
            for ($index = 0; $index < $nodesToRemove->length; $index++) {
                $nodeToRemove = $nodesToRemove->item($index);
                $nodeToRemove->parentNode->removeChild($nodeToRemove);
            }
        }
    }
323697
public static function delete($name, $path = "/") {
		if (isset ( $_COOKIE [$name] )) {
			unset ( $_COOKIE [$name] );
		}
		\setcookie ( $name, "", \time () - 3600, $path );
	}
719397
private function clearDirectory($path)
    {
        $this->debug("Clear directory: {$path}");
        $this->delete($path);
        $this->makeDirectory($path);
    }
1080773
public function delete($path)
    {
        return (bool) $this->normalizeResponse(
            $this->cosApi->delFile($this->getBucket(), $path)
        );
    }
927400
private function removePath(string $path): void
    {
        if (false !== strpos($path, '*')) {
            $paths = glob($path);
            foreach ($paths as $path) {
                $this->removePath($path);
            }
        } else {
            if (is_dir($path)) {
                $iterator = new \RecursiveDirectoryIterator($path);
                $iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::CHILD_FIRST);
                /** @var \SplFileInfo $file */
                foreach ($iterator as $file) {
                    if ('.' === $file->getBasename() || '..' === $file->getBasename()) {
                        continue;
                    }
                    if ($file->isLink() || $file->isFile()) {
                        unlink($file->getPathname());
                    } else {
                        rmdir($file->getPathname());
                    }
                }
                rmdir($path);
            } else {
                if (is_file($path)) {
                    unlink($path);
                }
            }
        }
    }
265361
public function delete($path)
  {
    $result = false;
    $parts = $this->split($path);

    $name = array_shift($parts);
    if (!sizeof($parts)) {
      if (isset($this->_ownData[$name])) {
        unset($this->_ownData[$name]);
        $result = true;
      }
    } elseif (isset($this->_subTrees[$name])) {
      $subtree = $this->_subTrees[$name];
      /* @var $subtree Wrapper_FS_Changes */

      $result = $subtree->delete($parts);
      if ($result && !$subtree->count()) {
        unset($this->_subTrees[$name]);
      }
    }

    return $result;
  }
169881
public function remove(array $path)
    {
        $current    = &$this->hierarchy;
        $pathLength = count($path);
        for ($i = 0; $i < $pathLength; $i++) {
            if (!isset($current[$path[$i]])) {
                break;
            }
            if ($i === $pathLength - 1) {
                unset($current[$path[$i]]);
                break;
            }
            $current = &$current[$path[$i]];
        }
    }
828162
public function delete($path)
    {
        if (false === $json = $this->runRequest($path, 'DELETE')) {
            return false;
        }

        return $this->decode($json);
    }
656841
public function delete ($path) {
		list ($first, $rest) = self::getFirstAndRestPathElements($path);

		# If we are going still deeper...
		if (!is_null($rest)) {
			if (array_key_exists($first, $this -> data)) {
				if ($this -> data[$first] instanceof MutableTreeInterface) {
					/** @var MutableTreeInterface $tree */
					$tree = $this -> data[$first];
					$tree -> delete($rest);
				} else {
					throw new InvalidKeyException("Value at key `" . $first . "` is a scalar; cannot step further down the requested path `" . $rest . "`");
				}
			} else {
				throw new NonExistentKeyException("Key `" . $first . "` does not exist.");
			}
		} else {
			unset($this -> data[$first]);
		}

		return $this;
	}
282522
public static function purge($path)
    {
        if (is_dir($path)) {
            foreach (scandir($path) as $item) {
                if (('.' === $item) || ('..' === $item)) {
                    continue;
                }

                self::purge($path . DIRECTORY_SEPARATOR . $item);
            }

            if (!rmdir($path)) {
                throw new RuntimeException(
                    sprintf(
                        'The directory "%s" could not be deleted.',
                        $path
                    )
                );
            }
        } else {
            if (!unlink($path)) {
                throw new RuntimeException(
                    sprintf(
                        'The file "%s" could not be deleted.',
                        $path
                    )
                );
            }
        }
    }
259817
public function removePath($path)
	{
		$path = rtrim($path, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
		$this->finder->removePath($path);

		if ($this->environment)
		{
			$this->finder->removePath($path.$this->environment);
		}
	}
981262
public function delete($path) {
		$this->connectIfNeeded();
		$this->handle->delete($path);
		$this->onFileDeleted(new Event(['sender' => $this, 'data' => $path]));
	}