Sulu\Bundle\MediaBundle\Media\Storage\LocalStorage::remove PHP Method

remove() public method

public remove ( $storageOption )
    public function remove($storageOption)
    {
        $this->storageOption = json_decode($storageOption);
        $segment = $this->getStorageOption('segment');
        $fileName = $this->getStorageOption('fileName');
        if (!$segment || !$fileName) {
            return false;
        }
        try {
            $this->filesystem->remove($this->uploadPath . '/' . $segment . '/' . $fileName);
        } catch (IOException $ex) {
            return false;
        }
        return true;
    }