本文整理汇总了PHP中Bitrix\Main\IO\File::isSystem方法的典型用法代码示例。如果您正苦于以下问题:PHP File::isSystem方法的具体用法?PHP File::isSystem怎么用?PHP File::isSystem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bitrix\Main\IO\File
的用法示例。
在下文中一共展示了File::isSystem方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: seoSitemapGetFilesData
function seoSitemapGetFilesData($PID, $arSitemap, $arCurrentDir, $sitemapFile)
{
global $NS;
$arDirList = array();
if ($arCurrentDir['ACTIVE'] == SitemapRuntimeTable::ACTIVE) {
$list = \CSeoUtils::getDirStructure($arSitemap['SETTINGS']['logical'] == 'Y', $arSitemap['SITE_ID'], $arCurrentDir['ITEM_PATH']);
foreach ($list as $dir) {
$dirKey = "/" . ltrim($dir['DATA']['ABS_PATH'], "/");
if ($dir['TYPE'] == 'F') {
if (!isset($arSitemap['SETTINGS']['FILE'][$dirKey]) || $arSitemap['SETTINGS']['FILE'][$dirKey] == 'Y') {
if (preg_match($arSitemap['SETTINGS']['FILE_MASK_REGEXP'], $dir['FILE'])) {
$f = new IO\File($dir['DATA']['PATH'], $arSitemap['SITE_ID']);
$sitemapFile->addFileEntry($f);
$NS['files_count']++;
}
}
} else {
if (!isset($arSitemap['SETTINGS']['DIR'][$dirKey]) || $arSitemap['SETTINGS']['DIR'][$dirKey] == 'Y') {
$arDirList[] = $dirKey;
}
}
}
} else {
$len = strlen($arCurrentDir['ITEM_PATH']);
if (!empty($arSitemap['SETTINGS']['DIR'])) {
foreach ($arSitemap['SETTINGS']['DIR'] as $dirKey => $checked) {
if ($checked == 'Y') {
if (strncmp($arCurrentDir['ITEM_PATH'], $dirKey, $len) === 0) {
$arDirList[] = $dirKey;
}
}
}
}
if (!empty($arSitemap['SETTINGS']['FILE'])) {
foreach ($arSitemap['SETTINGS']['FILE'] as $dirKey => $checked) {
if ($checked == 'Y') {
if (strncmp($arCurrentDir['ITEM_PATH'], $dirKey, $len) === 0) {
$fileName = IO\Path::combine(SiteTable::getDocumentRoot($arSitemap['SITE_ID']), $dirKey);
if (!is_dir($fileName)) {
$f = new IO\File($fileName, $arSitemap['SITE_ID']);
if ($f->isExists() && !$f->isSystem() && preg_match($arSitemap['SETTINGS']['FILE_MASK_REGEXP'], $f->getName())) {
$sitemapFile->addFileEntry($f);
$NS['files_count']++;
}
}
}
}
}
}
}
if (count($arDirList) > 0) {
foreach ($arDirList as $dirKey) {
$arRuntimeData = array('PID' => $PID, 'ITEM_PATH' => $dirKey, 'PROCESSED' => SitemapRuntimeTable::UNPROCESSED, 'ACTIVE' => SitemapRuntimeTable::ACTIVE, 'ITEM_TYPE' => SitemapRuntimeTable::ITEM_TYPE_DIR);
SitemapRuntimeTable::add($arRuntimeData);
}
}
SitemapRuntimeTable::update($arCurrentDir['ID'], array('PROCESSED' => SitemapRuntimeTable::PROCESSED));
}
示例2: addFileEntry
/**
* Adds new file entry to the current sitemap
*
* @param File $f File to add.
*
* @return void
* @throws \Bitrix\Main\IO\FileNotFoundException
*/
public function addFileEntry(File $f)
{
if($f->isExists() && !$f->isSystem())
{
$this->addEntry(array(
'XML_LOC' => $this->settings['PROTOCOL'].'://'.\CBXPunycode::toASCII($this->settings['DOMAIN'], $e = null).$this->getFileUrl($f),
'XML_LASTMOD' => date('c', $f->getModificationTime()),
));
}
}