Esempio n. 1
0
 public function allLinks($from)
 {
     $files = $this->filesystem->allFiles($this->getBaseDir() . DIRECTORY_SEPARATOR . $from);
     $links = [];
     foreach ($files as $key => $file) {
         $links[$key] = url(env('LOCAL_BASE_DIR') . DIRECTORY_SEPARATOR . $file);
         $files[$key] = $this->filesystem->getDriver()->getAdapter()->getPathPrefix() . $files[$key];
     }
     return ['files' => $files, 'links' => $links];
 }
 public function isReachable() : bool
 {
     if (is_null($this->disk)) {
         return false;
     }
     try {
         $this->disk->allFiles($this->backupName);
         return true;
     } catch (Exception $exception) {
         $this->connectionError = $exception;
         return false;
     }
 }
Esempio n. 3
0
 /**
  * Get all of the files from the given directory (recursive).
  *
  * @param  string|null $directory
  *
  * @return array
  */
 public function allFiles($directory = null)
 {
     $directory = $this->getPathPrefix($directory);
     return $this->drive->allFiles($directory);
 }