Esempio 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'));
 }
Esempio 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);
         }
     }
 }
Esempio 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());
 }