Beispiel #1
0
 /**
  * Delete a file.
  *
  * @param $path
  *
  * @return bool|string
  */
 public function deleteFile($path)
 {
     $path = $this->cleanFolder($path);
     if (!$this->disk->exists($path)) {
         return 'File does not exist.';
     }
     return $this->disk->delete($path);
 }
Beispiel #2
0
 /**
  * Delete the file at a given path.
  *
  * @param string|array $paths
  * @return bool 
  * @static 
  */
 public static function delete($paths)
 {
     return \Illuminate\Filesystem\FilesystemAdapter::delete($paths);
 }
 /**
  * @param FilesystemAdapter $disk
  */
 private function deleteFiles(FilesystemAdapter $disk)
 {
     foreach ($this->getFiles() as $file) {
         $disk->delete($file);
     }
 }