Delete remote file

@param string $path Remote Path

@return bool
@throws
7890
public function delete($path)
    {
        $path = trim($path, '/');

        if (!$this->isFile($path)) {
            $path = $this->bucket . "/" . $path;
            throw new ExceptionStorage("File {$path} Not found or Not Is File", static::E_NOT_IS_FILE);
        }

        $response = $this->clientS3->deleteObject(array(
            'Bucket' => $this->bucket,
            'Key'    => $path,
        ));

        return (bool) $response;
    }
63284
public static function remove($path)
    {
        $path = Normalize::diskFullPath($path);

        if (!self::exist($path)) {
            return false;
        }

        foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST) as $dir) {
            $dir->isFile() ? @unlink($dir->getPathname()) : @rmdir($dir->getPathname());
        }
        return @rmdir($path);
    }
417408
public function deleteFile($path)
    {
        $path = $this->cleanFolder($path);

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

        return 'File does not exist.';
    }
407901
public function unlink($path)
    {
        return $this->_getOssClient($path)->deleteObject(AliyunOSS::getBucket(), $this->_getNamePart($path));
    }
1205304
public function unlink($path)
    {
        $container = $this->getContainerFromContext($path);

        try {

            $path = $this->stripScheme($path);

            $parent = $container->nodeAt(dirname($path));

            $permissionHelper = $container->getPermissionHelper($parent);
            if (!$permissionHelper->isWritable()) {
                trigger_error(
                    sprintf('rm: %s: Permission denied', $path),
                    E_USER_WARNING
                );

                return false;
            }

            $container->remove($path = $this->stripScheme($path));
        } catch (NotFoundException $e) {
            trigger_error(
                sprintf('rm: %s: No such file or directory', $path),
                E_USER_WARNING
            );

            return false;
        } catch (\RuntimeException $e) {
            trigger_error(
                sprintf('rm: %s: is a directory', $path),
                E_USER_WARNING
            );

            return false;
        }

        return true;
    }
752055
public function delete($path)
    {
        try{
            $this->getOss()->deleteObject($this->bucket, $path);
            return true;
        }catch (OssException $e){

        }
        return false;
    }
1303796
public function delete($path)
    {
        $result = $this->client->deleteObject([
            'Bucket' => $this->getBucket(),
            'Key'    => $path,
        ]);

        return (bool) $result;
    }
478062
public function delete($path)
    {
        $path = $this->applyPathPrefix($path);
        $object = $this->bucket->object($path);

        if (false === $object->exists()) {
            return true;
        }

        $object->delete();

        return !$object->exists();
    }
969232
public function delete($path) {
        if (false === @ftp_delete($this->getConnection(), $path)) {
            throw $this->newFTPException(sprintf("delete %s failed", $path));
        }
        return $this;
    }
1261229
public function unlink($path)
    {
        if (false === self::cache()->get($path)) {
            return false;
        }

        self::cache()->delete($path);

        return true;
    }
498353
private function unlink(string $path): bool
    {
        if (!@unlink($path)) {
            $message = 'Could not unlink file.';
            if ($error = error_get_last()) {
                $message .= sprintf(' Errno: %d; %s', $error['type'], $error['message']);
            }
            throw new FileException($message);
        }

        return true;
    }
1374212
public static function delete($path)
    {
        $files = self::getContent($path);
        foreach ($files as $file) {
            if (is_dir($path.DIRECTORY_SEPARATOR.$file)) {
                self::delete($path.DIRECTORY_SEPARATOR.$file);
            } else {
                @unlink($path.DIRECTORY_SEPARATOR.$file);
            }
        }

        return @rmdir($path);
    }
729560
protected static function tryDelete($path)
    {
        $success = true;

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

        return $success;
    }
482559
public function delete($path)
    {
        $this->ftp->chdir($this->getDefaultPath());
        $result = $this->ftp->delete($path);
        if (!$result) {
            $files = $this->ftp->nlist($path);
            if ($files && is_array($files)) {
                foreach ($files as $file) {
                    $this->delete($file);
                }

                return $this->ftp->rmdir($path);
            }

            return false;
        }
    }
395084
public function delete($path)
    {
        [$prefix, $path] = $this->getPrefixAndPath($path);

        return $this->getFilesystem($prefix)->delete($path);
    }
751435
public function unlink(string $path): bool
    {
        $realPath = $this->resolvePath(vfsStream::path($path));
        $content  = $this->getContent($realPath);
        if (null === $content) {
            trigger_error('unlink(' . $path . '): No such file or directory', E_USER_WARNING);
            return false;
        }

        if ($content->getType() !== vfsStreamContent::TYPE_FILE) {
            trigger_error('unlink(' . $path . '): Operation not permitted', E_USER_WARNING);
            return false;
        }

        return $this->doUnlink($realPath);
    }
214100
public function delete($path)
    {
        $object = $this->applyPathPrefix($path);

        try {
            $this->client->deleteObject($this->bucket, $object);
        } catch (OssException $e) {
            return false;
        }

        return true;
    }