本文整理汇总了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