Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 protected function load()
 {
     $this->backups = array();
     /**
      * @var \SplFileInfo $backupDirectory
      */
     foreach (Finder::create()->in($this->directory)->depth(0)->directories()->sortByModifiedTime() as $backupDirectory) {
         $backup = new Backup($backupDirectory->getBasename(), $this->getFiles($backupDirectory->getPathname()), 0, $backupDirectory->getCTime(), $backupDirectory->getMTime());
         $this->backups[$backup->getName()] = $backup;
     }
 }
 /**
  * {@inheritdoc}
  */
 protected function load()
 {
     $this->backups = array();
     /**
      * @var \SplFileInfo $content
      */
     foreach ($this->flysystem->listContents() as $content) {
         if ($content['type'] == 'dir') {
             $backup = new Backup($content['basename'], $this->getFiles($content['path']), $content['timestamp'], $content['timestamp']);
             $this->backups[$backup->getName()] = $backup;
         }
     }
 }