src/Handler/FileHandler.php
public function deleteVariant(TargetInterface $target, $variant)
    {
        if ($variant == static::ORIGINAL) {
            $path = $target->original();
        } else {
            $path = $target->variant($variant);
        }

        // If the file does not exist, consider 'deletion' a success
        if ( ! $this->storage->exists($path)) {
            return true;
        }

        return $this->storage->delete($path);
    }
public function deleteVariant(TargetInterface $target, $variant)
    {
        if ($variant == static::ORIGINAL) {
            $path = $target->original();
        } else {
            $path = $target->variant($variant);
        }

        // If the file does not exist, consider 'deletion' a success
        if ( ! $this->storage->exists($path)) {
            return true;
        }

        return $this->storage->delete($path);
    }
public function deleteVariant ( TargetInterface $ target , $ variant ) { if ( $ variant == static :: ORIGINAL ) { $ path = $ target -> original ( ) ; } else { $ path = $ target -> variant ( $ variant ) ; } // If the file does not exist, consider 'deletion' a success if ( ! $ this -> storage -> exists ( $ path ) ) { return true ; } return $ this -> storage -> delete ( $ path ) ; }
Deletes a single variant.

@param TargetInterface $target       may be a full file path, or a base path
@param string          $variant      'original' refers to the original file
@return bool
Deletes a single variant .