Perform the media deletion.

@param  string  $type
@param  string  $path

@return bool
501302
private function performDeleteMedia($type, $path)
    {
        switch (Str::lower($type)) {
            case Media::MEDIA_TYPE_FILE:
                return $this->media->deleteFile($path);

            case Media::MEDIA_TYPE_DIRECTORY:
                return $this->media->deleteDirectory(trim($path, '/'));

            default:
                return false;
        }
    }
1080773
public function delete($path)
    {
        return (bool) $this->normalizeResponse(
            $this->cosApi->delFile($this->getBucket(), $path)
        );
    }
530511
public function is(string $path, string $type = 'page'): ?string
  {
    return $this->from_path($path, $type);
  }
1044763
public static function delete($id = null, $type = null, $specific = null) {

		$path = preg_match('/public/i', $id)?explode('public/', $id)[1]:$id;
		if ($type === null && $id !== null and !is_numeric($id)) {
			if (Storage::disk(env('FILESYSTEM_DRIVER', 'public'))->has($path)) {
				Storage::delete($id);
			}
		} elseif ($specific !== null && $specific > 0) {
			$delete = Files::find($specific);
			if (!empty($delete)) {
				foreach (self::sizes() as $key => $val) {
					if (Storage::disk(env('FILESYSTEM_DRIVER', 'public'))->has($path)) {
						Storage::delete($delete->path.$key.'_'.$delete->file);
						Storage::deleteDirectory($delete->path);
					}
				}
				Storage::delete($delete->full_path);
				Storage::deleteDirectory($delete->path);
				$delete->forceDelete();
			}
		} elseif (!empty($type) and !empty($id) && empty($specific)) {
			$delete_all = Files::where('type_file', $type)->where('type_id', $id)->get();
			foreach ($delete_all as $delete) {
				foreach (self::sizes() as $key => $val) {
					if (Storage::has($delete->path.'/'.$val.'_'.$delete->file)) {
						Storage::delete($delete->path.'/'.$val.'_'.$delete->file);
					}
				}
				Storage::delete($delete->full_path);
				Storage::deleteDirectory($delete->path);
				Storage::deleteDirectory($type.'/'.$id);
				$delete->forceDelete();
			}
		}
	}
981262
public function delete($path) {
		$this->connectIfNeeded();
		$this->handle->delete($path);
		$this->onFileDeleted(new Event(['sender' => $this, 'data' => $path]));
	}
1000656
public function deleteDir($path)
    {
        if ( $this->has($path) ) {
            //递归删除全部子文件
            $this->recursiveDeleteDir($path);
            return true;
        }
        return false;
    }
41513
public function permission(String $path, Int $type = 0755) : Bool
    {
        if( @ssh2_sftp_chmod($this->connect, $path, $type) )
        {
            return true;
        }
        else
        {
            throw new InvalidArgumentException(NULL, '$this->connect');
        }
    }
718244
public function saveTo($path , $type='png', $quality=null)
	{
		if (!$path) return false;
		return $this->outputTo($path, $type, $quality);
	}
409264
public function delete($path)
    {
        $location = $this->applyPathPrefix($path);
        $this->ossClient->deleteObject($this->bucket, $location);
        return true;
    }
179590
public static function delete($path)
	{
		if (is_dir($path)) {
			Dir::delete($path);
		} elseif (is_file($path)) {
			File::delete($path);
		}

		return true;
	}
232015
public static function delete($path)
    {
        if (is_dir($path)) {
            Folder::delete($path);
        } elseif (is_file($path)) {
            File::delete($path);
        }

        return true;
    }
430971
protected function createDetection(string $path, $type = Detection::TYPE_VIRUS, $description = null): Detection
    {
        return new Detection($path, $type, $description);
    }
582718
public static function createInvalidLinkTypeReturned(string $path, string $type): self
    {
        return new self(
            sprintf(
                'The link normalizer callback needs to return a %s|null, "%s" given at path: "%s"',
                LinkInterface::class,
                $type,
                $path
            )
        );
    }
189448
public function delete($id, $type) {
		$params = array(
			'id' => $id,
			'type' => $type
		);
		return $this->master->call('files/delete', $params);
	}
1294852
public function delete($path)
    {
        return (bool)$this->normalizeResponse(
            Cosapi::delFile($this->getBucket(), $path)
        );
    }
1303796
public function delete($path)
    {
        $result = $this->client->deleteObject([
            'Bucket' => $this->getBucket(),
            'Key'    => $path,
        ]);

        return (bool) $result;
    }
527427
protected function doRotation(
        /*# string */ $path,
        /*# int */ $type
    )/*# : bool */ {
        switch ($type) {
            // no rotation
            case self::ROTATE_NONE:
                return true;

            // rotate by date
            case self::ROTATE_DATE:
                return $this->rotateByDate($path);

            // rotate by size
            default:
                return $this->rotateBySize($path, $type);
        }
    }