Ejemplo n.º 1
0
 /**
  * Handle the command.
  *
  * @param StreamRepositoryInterface $streams
  */
 public function handle(StreamRepositoryInterface $streams)
 {
     if (!$this->folder->isForceDeleting()) {
         return;
     }
     $streams->delete($streams->findBySlugAndNamespace($this->folder->getSlug(), 'files'));
 }
Ejemplo n.º 2
0
 /**
  * Handle the command.
  *
  * @param FileRepositoryInterface $files
  */
 public function handle(FileRepositoryInterface $files)
 {
     foreach ($this->folder->getFiles() as $file) {
         if ($this->folder->isForceDeleting()) {
             $files->forceDelete($file);
         } else {
             $files->delete($file);
         }
     }
 }
Ejemplo n.º 3
0
 /**
  * Handle the command.
  *
  * @param MountManager $manager
  */
 public function handle(MountManager $manager)
 {
     if (!($disk = $this->folder->getDisk())) {
         return;
     }
     if (!$this->folder->isForceDeleting()) {
         return;
     }
     $manager->deleteDir($disk->getSlug() . '://' . $this->folder->getSlug());
 }