Delete the file at a given path.

@param  string|array $paths
@return bool
437834
public function delete($paths)
    {
        return $this->filesystem->delete(
            collect((array)$paths)
                ->map(function ($path) {
                    return $this->path($path);
                })
                ->values()
                ->all()
        );
    }
498800
protected function copyDir(array $paths, /*# string */ $destination)
    {
        foreach ($paths as $path) {
            $dest = $this->mergePath($destination, basename($path));
            if (!$this->copy($path, $dest)) {
                return false;
            }
        }
        return true;
    }
24970
public function delete($path)
    {
        $location = $this->applyPathPrefix($path);

        $command = $this->s3Client->getCommand(
            'deleteObject',
            [
                'Bucket' => $this->bucket,
                'Key'    => $location,
            ]
        );

        $this->s3Client->execute($command);

        return ! $this->has($path);
    }
195675
public function deleteFile($path)
  {
    $entity = $this->getEntity($path);

    if (is_null($entity)) {
      $result = null;
    } elseif (!$entity->file_exists() || !$entity->is_file()) {
      $result = null;
    } else {
      $result = Entity_Deleted::newInstance($entity);

      $changes = $this->getChanges();
      $changes->add($path, $result);
    }

    return $result;
  }
1349404
public function delete($path)
    {
        return Response::parseResponse(
            $this->getCos()->delFile($this->getBucket(), PathLibrary::normalizerPath($path))
        ) != false ;
    }
1017103
public function delete($path)
    {
        $url = self::BASE_URI.$this->getPathUnderRootDrive($path);

        $response = $this->getResponse('DELETE', $url);
        $success = ($response->getStatusCode() == '204');

        return $success;
    }
296488
public function delete(string $path) : bool
	{
		$path = $this->normalizePath($path);
		
		// Check if the path contains folders we dont want to delete
		if (str_contains($path, $this->folderPathExcludeList)) {
			return true;
		}
		
		$requestUrl = $this->siteUrl.'/sites/'.$this->siteName.'/_api/Web/GetFolderByServerRelativeUrl(\''.$this->folderPath.$path.'\')';
		
		$this->requestHeaders['IF-MATCH'] = 'etag';
			
		$this->requestHeaders['X-HTTP-Method'] = 'DELETE';
				
		$options = [
			'headers' => $this->requestHeaders,
		];
			
		$response = $this->send('POST', $requestUrl, $options);
		
		return $response->getStatusCode() === 200 ? true : false;
	}
1080773
public function delete($path)
    {
        return (bool) $this->normalizeResponse(
            $this->cosApi->delFile($this->getBucket(), $path)
        );
    }
749427
public function delete($path, $parameters = [])
    {
        $request = $this->getRequest(static::HTTP_DELETE, $path, $parameters);

        return $this->sendRequest($request);
    }
1190145
protected function deleteLangFiles($path)
    {
        if (is_dir($path)) {
            $this->filesystem->cleanDirectory($path);
            $this->filesystem->deleteDirectory($path);
            return true;
        }
        return false;
    }
179977
def delete_paths(paths):
    
    for path in paths:
        if exists(path):
            if isfile(path):
                remove(path)
            else:
                rmtree(path)
948482
public static function delete($path)
    {
        if (!is_readable($path)) {
            return false;
        }

        if (!is_dir($path)) {
            unlink($path);
            return true;
        }

        foreach (scandir($path) as $file) {
            if ($file === '.' || $file === '..') {
                continue;
            }
            $file = $path . '/' . $file;
            if (is_dir($file)) {
                self::delete($file);
            } else {
                unlink($file);
            }
        }

        rmdir($path);

        return true;
    }
1240219
public static function delete(array &$values, $path)
    {
        /** @noinspection ReferenceMismatchInspection */
        if (!static::isArray($values)) {
            // This is not an array!
            return false;
        }

        if (is_array($path)) {
            // The path has already been separated into segments
            $segments = $path;
        } else {
            $path = (string) $path;

            // Remove starting delimiters and spaces
            $path = ltrim($path, sprintf('%s ', static::PATH_DELIMITER));
            // Remove ending delimiters, spaces, and wildcards
            $path = rtrim($path, sprintf('%s %s', static::PATH_DELIMITER, static::PATH_WILDCARD));
            // Split the segments by delimiter
            $segments = explode(static::PATH_DELIMITER, $path);
        }

        while (count($segments) > 1) {
            $key = array_shift($segments);

            /** @noinspection ReferenceMismatchInspection */
            if (!array_key_exists($key, $values) || !is_array($values[$key])) {
                return false;
            }

            $values =& $values[$key];
        }

        unset($values[array_shift($segments)]);

        return true;
    }
417408
public function deleteFile($path)
    {
        $path = $this->cleanFolder($path);

        if ($this->checkFileExists($path)) {
            return $this->disk->delete($path);
        }

        return 'File does not exist.';
    }
742536
public static function deleteDirRecursively($path)
    {
        if (! $paths = self::getFilesFromDir($path)) {
            return false;
        }

        foreach ($paths as $file) {
            if ($file->isFile()) {
                if (! self::delete($file->getRealPath())) {
                    return false;
                }
            } elseif (! $file->isDot() && $file->isDir()) {
                self::deleteDirRecursively($file->getRealPath());
                self::deleteEmptyDir($file->getRealPath());
            }
        }

        return self::deleteEmptyDir($path);
    }
1365154
public function removeRoute($path)
    {
        $routeName = ltrim($path, '/');
        if (!isset($this->routes[$routeName])) {
            return false;
        }
        unset($this->routes[$routeName]);
        return true;
    }
1133840
public static function deleteDirectory($path)
    {
        if (!is_dir($path)) {
            return false;
        }

        $files = array_diff(scandir($path), ['.', '..']);
        foreach ($files as $file) {
            $inner_file = static::join($path, $file);
            if (is_dir($inner_file)) {
                // Delete inner directory recursive
                static::deleteDirectory($inner_file);
            } else {
                // Delete file
                unlink($inner_file);
            }
        }

        return rmdir($path);
    }