Josegonzalez\Upload\File\Writer\DefaultWriter::deletePath PHP Méthode

deletePath() public méthode

Deletes a path from a filesystem
public deletePath ( League\Flysystem\FilesystemInterface $filesystem, string $path ) : boolean
$filesystem League\Flysystem\FilesystemInterface a filesystem writer
$path string the path that should be deleted
Résultat boolean
    public function deletePath(FilesystemInterface $filesystem, $path)
    {
        $success = false;
        try {
            $success = $filesystem->delete($path);
        } catch (FileNotFoundException $e) {
            // TODO: log this?
        }
        return $success;
    }