本文整理汇总了PHP中kFile::recursiveDirList方法的典型用法代码示例。如果您正苦于以下问题:PHP kFile::recursiveDirList方法的具体用法?PHP kFile::recursiveDirList怎么用?PHP kFile::recursiveDirList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kFile
的用法示例。
在下文中一共展示了kFile::recursiveDirList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAssetDataFilesArray
private function getAssetDataFilesArray(kConvertLiveSegmentJobData $data)
{
$amfFilesDir = dirname($data->getDestDataFilePath());
$pattern = "/{$data->getEntryId()}_{$data->getAssetId()}_{$data->getMediaServerIndex()}_[0-9]*.data/";
$files = kFile::recursiveDirList($amfFilesDir, true, false, $pattern);
natsort($files);
return $files;
}
示例2: removeIndicator
public function removeIndicator()
{
// delete any of the indicators available
$indicator_list = kFile::recursiveDirList(self::$s_indicator_path, true, false, $this->pattern);
if (count($indicator_list) > 0) {
kFile::deleteFile($indicator_list[0]);
}
if (count($indicator_list) > 100) {
// many file indicator - no real reason to leave them all
for ($i = 1; $i < 50; $i++) {
kFile::deleteFile($indicator_list[$i]);
}
}
}
示例3: readLog
private static function readLog($name, $size)
{
$pattern = "/" . $name . "\$/";
$files = kFile::recursiveDirList(self::LOG_DIR, true, false, $pattern);
$result = array();
if ($files) {
foreach ($files as $file) {
$data = kFile::getFileData($file);
$data->content = kFile::readLastBytesFromFile($file, $size);
$result[] = $data;
}
}
return $result;
}