Beispiel #1
0
 /**
  * Finds out which files should be transferred.
  * @return Garp_Content_Upload_FileList List of file paths that should be transferred from source to target.
  */
 public function fetchDiff()
 {
     $progress = Garp_Cli_Ui_ProgressBar::getInstance();
     $diffList = new Garp_Content_Upload_FileList();
     $sourceList = $this->_source->fetchFileList();
     $targetList = $this->_target->fetchFileList();
     $progress->display("Looking for new files");
     $newFiles = $this->_findNewFiles($sourceList, $targetList);
     $progress->display("Looking for conflicting files");
     $conflictingFiles = $this->_findConflictingFiles($sourceList, $targetList);
     $diffList->addEntries($newFiles);
     $diffList->addEntries($conflictingFiles);
     return $diffList;
 }
 /**
  * @return Garp_Content_Upload_FileList
  */
 public function fetchFileList()
 {
     $fileList = new Garp_Content_Upload_FileList();
     $configuredPaths = $this->_getConfiguredPaths();
     foreach ($configuredPaths as $type => $relDir) {
         $fileListByType = $this->fetchFileListByType($type, $relDir);
         $fileList->addEntries($fileListByType);
     }
     return $fileList;
 }
 /**
  * @return Garp_Content_Upload_FileList
  */
 public function fetchFileList()
 {
     $fileList = new Garp_Content_Upload_FileList();
     $configuredPaths = $this->_getConfiguredPaths();
     foreach ($configuredPaths as $type => $relDir) {
         $absDir = $this->_getBaseDir() . $relDir;
         $this->_createDir($absDir);
         $dirList = $this->_getDirList($absDir);
         $fileListByType = $this->_addFilesByType($dirList, $type);
         $fileList->addEntries($fileListByType);
     }
     return $fileList;
 }
Beispiel #4
0
 public function fetchFileList()
 {
     $fileList = new Garp_Content_Upload_FileList();
     $service = $this->_getService();
     $uploadTypePaths = $this->_getConfiguredPaths();
     foreach ($uploadTypePaths as $type => $dirPath) {
         $service->setPath($dirPath);
         $dirList = $service->getList();
         $fileListByType = $this->_findFilesByType($dirList, $type);
         $fileList->addEntries($fileListByType);
     }
     return $fileList;
 }