delete image

@param mixed $path
@return string
504319
public function delete($path=null)
	{
		if (is_null($path)) return;

		$basePath = $this->getImageBasePath();
		$imagePath = $basePath.'/'.$path;

		if (File::exists($imagePath)) {
			File::delete($imagePath);
		}
	}
932197
public static function deleteDir($path)
    {
        if (!is_dir($path)) return;

        $path = rtrim($path, '/') . '/';

        $dir_obj = opendir($path);

        while ($dir = readdir($dir_obj)) {
            if ($dir != '.' && $dir != '..') {
                $file = $path . $dir;
                if (is_dir($file)) {
                    self::deleteDir($file);
                } elseif (is_file($file)) {
                    unlink($file);
                }

            }
        }
        closedir($dir_obj);
        rmdir($path);
    }
1188128
public function delete($path)
    {
        $paths = is_array($path) ? $path : func_get_args();

        $success = true;

        foreach ($paths as $path) {

            if ($this->isDirectory($path)) {
                $success = $this->laravelFS->deleteDirectory($path);
                continue;
            }
            $success = $this->laravelFS->delete($path);

        }

        return $success;
    }
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;
    }
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);
    }
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;
            }
        }
    }
208067
public function deleteNode($path)
	 {
	 	if(!$this->zookeeper->exists($path))
	 	{
	 		return null;
	 	}
	 	else
	 	{
	 		return $this->zookeeper->delete($path);
	 	}
	 }
688739
public function delete(string $path): bool
    {
        $path = $this->normalizePath($path);
        $this->assertPresent($path);

        return $this->getAdapter()->delete($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;
    }
732389
public static function remove($path)
    {
        $path = self::resolve($path);

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

        return (bool) $result;
    }
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);
    }
122508
private function _delete_dir($path = '')
    {
        $cache_path = $this->config->get('cache_path');

        // make sure nobody can delete above the cache root
        if (strpos($path, $cache_path) === false) return;

        if (is_file($path)) {
            return (bool) unlink($path);
        } elseif (is_dir($path)) {
            $scan = glob(rtrim($path,'/').'/*');

            foreach ($scan as $item) {
                $this->_delete_dir($item);
            }

            return rmdir($path);
        }
    }
1203904
public function delete($path)
    {
        if ($file = $this->getFileObject($path)) {
            $name = $file->getName();
            list ($parentId, $id) = $this->splitPath($path);
            if ($parents = $file->getParents()) {
                $file = new Google_Service_Drive_DriveFile();
                $opts = [];
                $res = false;
                if (count($parents) > 1) {
                    $opts['removeParents'] = $parentId;
                } else {
                    if ($this->options['deleteAction'] === 'delete') {
                        try {
                            $this->service->files->delete($id);
                        } catch (Google_Exception $e) {
                            return false;
                        }
                        $res = true;
                    } else {
                        $file->setTrashed(true);
                    }
                }
                if (!$res) {
                    try {
                        $this->service->files->update($id, $file, $this->applyDefaultParams($opts, 'files.update'));
                    } catch (Google_Exception $e) {
                        return false;
                    }
                }
                unset($this->cacheFileObjects[$id], $this->cacheHasDirs[$id], $this->cacheFileObjectsByName[$parentId . '/' . $name]);
                return true;
            }
        }
        return false;
    }
1237536
public static function purifyPath($path)
    {
        $path = (string)$path;
        $path = trim($path);
        $path = rtrim($path, '\\/');

        return $path;
    }
1329099
public function image($path)
    {
        if (gplcart_path_is_absolute($path)) {
            $file = $path;
            $url = gplcart_path_relative($path);
        } else {

            $path = gplcart_path_normalize($path);
            $prefix = gplcart_path_relative(GC_DIR_FILE);

            if (strpos($path, "$prefix/") === 0) {
                $url = $path;
                $file = gplcart_file_absolute($path);
            } else {
                $url = "$prefix/$path";
                $file = gplcart_path_absolute($path);
            }
        }

        $query = is_file($file) ? array('v' => filemtime($file)) : array();

        return $this->get($url, $query, false, true);
    }
409264
public function delete($path)
    {
        $location = $this->applyPathPrefix($path);
        $this->ossClient->deleteObject($this->bucket, $location);
        return true;
    }