private function markFileSyncAsReady(entry $entry)
 {
     // FileSync - mark file sync as ready for converted data file
     $fileSyncKey = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_DATA);
     kFileSyncUtils::markLocalFileSyncAsReady($fileSyncKey);
     // FileSync - mark file sync as ready for converted data file in edit flavor
     $fileSyncKey = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_DATA_EDIT);
     kFileSyncUtils::markLocalFileSyncAsReady($fileSyncKey, $strict = false);
     // do not be strict, not all entries have EDIT file
 }
 protected function archiveFile($file_name)
 {
     KalturaLog::debug("Archiving file [" . $file_name . "]");
     $id = self::getEntryIdFromFileName($file_name);
     $entry = entryPeer::retrieveByPKNoFilter($id);
     $entry->setArchiveExtension(pathinfo($file_name, PATHINFO_EXTENSION));
     $sync_key = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_ARCHIVE);
     $file_sync = kFileSyncUtils::createSyncFileForKey($sync_key, false, false);
     $target = kFileSyncUtils::getLocalFilePathForKey($sync_key, false);
     KalturaLog::debug("Archiving file [" . $file_name . "] to [" . $target . "]}");
     // MOVE - there is no need to copy because we the ConvCommand will include the file path anyway
     if ($file_name == $target) {
         KalturaLog::debug("File [{$file_name}] already archived");
         return $file_sync;
     }
     // there is a file in the archive but the current file does not exist
     if (!file_exists($file_name) && file_exists($target)) {
         return $file_sync;
     }
     if (file_exists($target) && filesize($target) == filesize($file_name)) {
         return $file_sync;
     } else {
         // move to archive and override if exists
         myContentStorage::moveFile($file_name, $target, true, false);
     }
     kFileSyncUtils::markLocalFileSyncAsReady($sync_key);
     return $file_sync;
 }