Beispiel #1
0
 /**
  * Add single file to the collection.
  *
  * @param FilesystemContract $file
  * @param string $namespace
  */
 protected function add(FilesystemContract $file, $namespace = '')
 {
     $this->backup->addToCollection(['name' => $file->asset(), 'path' => $file->fullPath()], $namespace);
 }
Beispiel #2
0
 /**
  * Add directory and its content to the collection.
  *
  * @param FilesystemContract $directory
  * @param string $namespace
  */
 protected function add(FilesystemContract $directory, $namespace = '')
 {
     $filesystem = new LeagueFilesystem(new Local($directory->rootPath(), LOCK_EX, Local::SKIP_LINKS), ['visibility' => AdapterInterface::VISIBILITY_PUBLIC]);
     $collection = $filesystem->listContents($directory->asset(), true);
     $this->addToCollection($directory, $namespace, $collection);
 }