Exemplo n.º 1
0
 public function deleteFile($file, StorageConfig $config)
 {
     $filePath = rtrim($config->resolvePath($this->owner), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $file;
     if (!empty($config->filesystem)) {
         if ($config->filesystem->has($filePath)) {
             $config->filesystem->delete($filePath);
         }
     } else {
         @unlink($filePath);
     }
 }