本文整理匯總了PHP中kFileSyncUtils::markLocalFileSyncAsReady方法的典型用法代碼示例。如果您正苦於以下問題:PHP kFileSyncUtils::markLocalFileSyncAsReady方法的具體用法?PHP kFileSyncUtils::markLocalFileSyncAsReady怎麽用?PHP kFileSyncUtils::markLocalFileSyncAsReady使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類kFileSyncUtils
的用法示例。
在下文中一共展示了kFileSyncUtils::markLocalFileSyncAsReady方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: markFileSyncAsReady
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
}
示例2: archiveFile
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;
}
開發者ID:EfncoPlugins,項目名稱:Media-Management-based-on-Kaltura,代碼行數:28,代碼來源:kConversionClientBase.class.php