Esempio n. 1
0
File: Sync.php Progetto: kriskbx/wyn
 /**
  * Initialize the sync process: read the files (new, update, delete) and add them to the queue.
  */
 public function init()
 {
     $this->out(SyncOutput::STARTUP_MESSAGE);
     $this->manager->init();
     $this->addNewFilesToQueue($this->manager->sortDirectoriesUp($this->manager->getNewFiles()));
     $this->addFilesToUpdateToQueue($this->manager->getFiles($this->manager->getFilesToUpdate($this->settings->checkFileSize())));
     if ($this->settings->delete()) {
         $this->addFilesToDeleteToQueue($this->manager->sortDirectoriesDown($this->manager->getFilesToDelete()));
     }
     if ($this->getFirstFromQueue()) {
         $this->out('lineBreak');
     }
     $this->outputHelper->setTotal($this->total());
 }