/** * Adds updated files to the processing queue * * @param array $fileIdentifierArray * @return void */ protected function detectChangedFilesInStorage(array $fileIdentifierArray) { foreach ($fileIdentifierArray as $fileIdentifier) { // skip processed files if ($this->storage->isWithinProcessingFolder($fileIdentifier)) { continue; } // Get the modification time for file-identifier from the storage $modificationTime = $this->storage->getFileInfoByIdentifier($fileIdentifier, array('mtime')); // Look if the the modification time in FS is higher than the one in database (key needed on timestamps) $indexRecord = $this->getFileIndexRepository()->findOneByStorageUidAndIdentifier($this->storage->getUid(), $fileIdentifier); if ($indexRecord !== FALSE) { $this->identifiedFileUids[] = $indexRecord['uid']; if ($indexRecord['modification_date'] < $modificationTime['mtime'] || $indexRecord['missing']) { $this->filesToUpdate[$fileIdentifier] = $indexRecord; } } else { $this->filesToUpdate[$fileIdentifier] = NULL; } } }