Delete the file at a given path

@param array $paths
@return bool
198490
public function delete( ... $paths ): bool
	{
		$all = 0;
		$removed = 0;
		if( count($paths) === 1 && is_array($paths[0]) )
		{
			$paths = $paths[0];
		}

		foreach( $paths as $path )
		{
			++ $all;
			$this->deleteOnce( (string) $path ) && ++ $removed;
		}

		return $all === $removed;
	}
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;
    }
242279
public function deleteFile($path)
    {
        event(new Events\FileDeleting($path));
        $deleted = $this->disk()->delete($path);
        event(new Events\FileDeleted($path, $deleted));

        return $deleted;
    }
1016948
public static function remove($path = null, array &$logs = array())
    {
        if (is_null($path)) {
            return null;
        }
        if (file_exists($path) && is_dir($path)) {
            if (!is_dir($path) || is_link($path)) {
                if (array_key_exists($path, $logs)) {
                    return false;
                }
                if (unlink($path)) {
                    return true;
                } else {
                    $logs[$path] = sprintf('Can not unlink file "%s".', $path);
                }
            }
            $ok = self::purge($path, $logs);
            if (true===$ok) {
                if (array_key_exists($path, $logs)) {
                    return false;
                }
                if (rmdir($path)) {
                    return true;
                } else {
                    $logs[$path] = sprintf('Can not remove directory "%s".', $path);
                }
            }
            clearstatcache();
            return $ok;
        } else {
            $logs[$path] = sprintf('Directory "%s" not found.', $path);
        }
        return false;
    }
346033
public function deleteFile(array $routes)
    {
        $basePath = Yii::getAlias($routes['basePath']);
        $filePath = "$basePath/{$this->url}";
        return is_file($filePath) ? unlink($filePath) : false;
    }
860766
public function delete($paths)
	{
		$paths = is_array($paths) ? $paths : func_get_args();

		foreach ($paths as $path)
		{
			$this->driver->delete($path);
		}

		return true;
	}
1370628
public function remove($files)
    {
        if ($files instanceof \Traversable) {
            $files = iterator_to_array($files, false);
        } elseif (!is_array($files)) {
            $files = array($files);
        }
        $files = array_reverse($files);
        foreach ($files as $file) {
            if (is_link($file)) {
                // See https://bugs.php.net/52176
                if (!@(unlink($file) || '\\' !== DIRECTORY_SEPARATOR || rmdir($file)) && file_exists($file)) {
                    $error = error_get_last();
                    throw new IOException(sprintf('Failed to remove symlink "%s": %s.', $file, $error['message']));
                }
            } elseif (is_dir($file)) {
                $this->remove(new \FilesystemIterator($file, \FilesystemIterator::CURRENT_AS_PATHNAME | \FilesystemIterator::SKIP_DOTS));

                if (!@rmdir($file) && file_exists($file)) {
                    $error = error_get_last();
                    throw new IOException(sprintf('Failed to remove directory "%s": %s.', $file, $error['message']));
                }
            } elseif (!@unlink($file) && file_exists($file)) {
                $error = error_get_last();
                throw new IOException(sprintf('Failed to remove file "%s": %s.', $file, $error['message']));
            }
        }
    }
1134637
public function delete($path)
    {
        try {
            $response = $this->api->deleteResources([$path]);

            return $response['deleted'][$path] === 'deleted';
        } catch (Api\Error $e) {
            return false;
        }
    }
2546
protected function _isWriteable($paths)
    {
        foreach ((array)$paths as $path) {
            $result[$path] = is_writable_resursive($path);
        }

        return $result;
    }
1049708
public function deleteItems(array $keys): bool
    {
        foreach ($keys as $key) {
            $this->delete($key);
        }

        return true;
    }
179977
def delete_paths(paths):
    
    for path in paths:
        if exists(path):
            if isfile(path):
                remove(path)
            else:
                rmtree(path)
1130427
public function deleteFile($path)
    {
        if (false === $this->exists($path)) {
            return $this;
        }

        $this->getFilesystem()->remove($path);

        return $this;
    }
401018
public function delete($path)
    {
        $paths = is_array($path) ? $path : func_get_args();

        $success = true;

        foreach ($paths as $path) {
            try {
                if ($this->isDirectory($path)) {
                    if (!$this->deleteDirectoryRecursive($path)) {
                        $success = false;
                    }
                    continue;
                }
                if (!@unlink($path)) {
                    $success = false;
                }
            } catch (Throwable $e) {
                $success = false;
            }
        }

        return $success;
    }
51256
public function delete()
    {
        if ($this->files->exists($path = $this->manifestPath.'/collections.json'))
        {
            return $this->files->delete($path);
        }
        else
        {
            return false;
        }
    }
844245
public function delete($path)
    {
        $bucketMgr = $this->getBucketManager();

        $error = $bucketMgr->delete($this->bucket, $path);
        if ($error !== null) {
            $this->logQiniuError($error);

            return false;
        } else {
            return true;
        }
    }
749427
public function delete($path, $parameters = [])
    {
        $request = $this->getRequest(static::HTTP_DELETE, $path, $parameters);

        return $this->sendRequest($request);
    }
1155120
public function delete($path)
    {
        $result = Uploader::destroy($path, ['invalidate' => true]);

        return is_array($result) ? $result['result'] == 'ok' : false;
    }